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
# sys.setrecursionlimit(10**9)
# import random
# from collections import Counter, defaultdict, deque
# from functools import lru_cache, reduce
# from itertools import accumulate,product
from heapq import nsmallest, nlargest, heapify, heappop, heappush
# from bisect import bisect_left,bisect_right
# from sortedcontainers import SortedList
# input = sys.stdin.buffer.readline
# import re
input = sys.stdin.readline
def mp():return list(map(int,input().split()))
def it():return int(input())
# import math

mod=10**9+7

nxt=[0]
def buildNxt(p):
    x,now=1,0
    while x<len(p):
        if p[x]==p[now]:
            x,now=x+1,now+1
            nxt.append(now)
        elif now:
            now=nxt[now-1]
        else:
            nxt.append(0)
            x+=1

# def getKmp():


def solve():
    n,m=mp()
    lr,ran=[],[]
    for i in range(n):
        l,r=mp()
        if i>0:ran.append((l-lr[-1][1],r-lr[-1][0],i))
        lr.append((l,r))
    bridge=mp()
    for i in range(m):
        bridge[i]=(bridge[i],i)
    bridge.sort()
    ran.sort()
    pq=[]
    ans=[0]*n
    j=0
    for length,i in bridge: # 枚举所有每个桥
        while j<n-1 and length>=ran[j][0]: # 放入每一个满足间隔条件的岛间距
            left,right,idx=ran[j]
            heappush(pq,(right,idx))  # 放入符合要求的间隔，按最大可接受长度从小到大排
            j+=1
        if pq and pq[0][0]<length:
            return print("No")
        if not pq:
            continue
        _,idx=heappop(pq)
        ans[idx]=i+1
    if j<n-1:
        return print("No")
    print("Yes")
    print(" ".join(map(str,ans[1:])))

    return

if __name__ == '__main__':

    # t=it()
    # for _ in range(t):
    #     solve()

    # n=it()
    # n,m,i=mp()
    # n,m=mp()
    solve()


# class Solution:
#     def smallestSubarrays(self, nums: List[int]) -> List[int]:
#         ans=[]
#         