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 heapq import heapify, heappop, heappush
input = sys.stdin.readline

def solve():
    n, m = list(map(int, input().split()))
    intervals = []
    for _ in range(n):
        l, r = list(map(int, input().split()))
        intervals.append([l, r])
    bridges = list(map(int, input().split()))
    # birdges要记录一下初始的序号
    bridges = [[v, i] for i, v in enumerate(bridges)]
    # n - 1个桥 连 相邻的区间
    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]
        minn = l2 - r1
        maxn = r2 - l1
        lengths.append([minn, maxn, i - 1])
    # 从m个桥中选n - 1个桥(不可重复选)，都可以分配到lengths中的某个区间中
    ans = [0] * (n - 1)
    # 双排序
    lengths.sort()
    bridges.sort()
    #print(lengths)
    #print(bridges)

    # 开始贪心, 遍历桥
    pq = []
    j = 0 # 目前遍历到第几个lengths
    for v, i in bridges:
        # minn比v小就放进来
        while j < n - 1 and lengths[j][0] <= v:
            # 只记录右端点和id
            heappush(pq, (lengths[j][1], lengths[j][2]))
            j += 1
        # 最贪心地找出一个最小的maxn右端点（通过堆）
        # 为什么要这样取？因为后面的bridge能达成最小的maxn可能是更小的
        if not pq:
            continue
        # 右端点比v还要小
        if pq[0][0] < v:
            return print('No')
        # 否则，拿掉最小maxn对应的二元组
        right, id = heappop(pq)
        ans[id] = i + 1

    # 不够数
    # j加一次，必定有一个新的答案
    if j < n - 1:
        return print('No')

    print('Yes')
    print(*ans)












if __name__ == '__main__':
    solve()