Andrewid the Android is a galaxy-famous detective. He is now chasing a criminal hiding on the planet Oxa-5, the planet almost fully covered with water.

The only dry land there is an archipelago of *n* narrow islands located in a row. For more comfort let's represent them as non-intersecting segments on a straight line: island *i* has coordinates [*l*<sub class="lower-index">*i*</sub>, *r*<sub class="lower-index">*i*</sub>], besides, *r*<sub class="lower-index">*i*</sub> &lt; *l*<sub class="lower-index">*i* + 1</sub> for 1 ≤ *i* ≤ *n* - 1.

To reach the goal, Andrewid needs to place a bridge between each pair of adjacent islands. A bridge of length *a* can be placed between the *i*-th and the (*i* + 1)-th islads, if there are such coordinates of *x* and *y*, that *l*<sub class="lower-index">*i*</sub> ≤ *x* ≤ *r*<sub class="lower-index">*i*</sub>, *l*<sub class="lower-index">*i* + 1</sub> ≤ *y* ≤ *r*<sub class="lower-index">*i* + 1</sub> and *y* - *x* = *a*. 

The detective was supplied with *m* bridges, each bridge can be used at most once. Help him determine whether the bridges he got are enough to connect each pair of adjacent islands.
The first line contains integers *n* (2 ≤ *n* ≤ 2·10<sup class="upper-index">5</sup>) and *m* (1 ≤ *m* ≤ 2·10<sup class="upper-index">5</sup>) — the number of islands and bridges.

Next *n* lines each contain two integers *l*<sub class="lower-index">*i*</sub> and *r*<sub class="lower-index">*i*</sub> (1 ≤ *l*<sub class="lower-index">*i*</sub> ≤ *r*<sub class="lower-index">*i*</sub> ≤ 10<sup class="upper-index">18</sup>) — the coordinates of the island endpoints.

The last line contains *m* integer numbers *a*<sub class="lower-index">1</sub>, *a*<sub class="lower-index">2</sub>, ..., *a*<sub class="lower-index">*m*</sub> (1 ≤ *a*<sub class="lower-index">*i*</sub> ≤ 10<sup class="upper-index">18</sup>) — the lengths of the bridges that Andrewid got.
import sys
from bisect import bisect_left, bisect_right
from math import inf
input = sys.stdin.readline

def sovle():
    n, m = list(map(int, input().split()))
    intervals = []
    for _ in range(m):
        l, r = list(map(int, input().split()))
        intervals.append([l, r])
    a = list(map(int, input().split()))
    lengths = [] # [minn, maxn]
    for i in range(1, n):
        l1, r1 = intervals[i - 1][0], intervals[i - 1][1]
        l2, r2 = intervals[i][0], intervals[i][1]
        lengths.append([l2 - r1, r2 - l1])
    # 能否在a中选出n - 1个（可重复）落在lengths的n - 1个区间中的
    # 要把对应的第几座桥给选出来, 每个桥最多只能用一次啊
    # 按桥的长度二分，多加一维记录第几个
    bridges = []
    for i, v in enumerate(a):
        bridges.append([v, i + 1])
    bridges.sort()
    print(lengths)
    print(bridges)
    ans = []
    flag = True
    for minn, maxn in lengths:
        idx1 = bisect_left(bridges, [minn, -inf])
        idx2 = bisect_right(bridges, [maxn, inf])
        # 在[idx1, idx2)中选一个代表
        print(idx1, idx2)
        if idx1 == idx2:
            flag = False
            break

    if not flag:
        print('No')
    else:
        print(*ans)






if __name__ == '__main__':
    sovle()