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.
from sys import stdin
import heapq

n,m = [int(x) for x in stdin.readline().split()]

islands = []

for i in range(n):
  islands.append([int(x) for x in stdin.readline().split()])
  
gaps = []

for i in range(n-1):
  gaps.append((islands[i+1][0]-islands[i][1], islands[i+1][1]-islands[i][0]))

bridges = [int(x) for x in stdin.readline().split()]
bridges = sorted([(bridges[x],x+1) for x in range(m)])

gaps2 = []

for l,r in gaps:
  low = 0
  high = m-1
  while low <= high:
    mid = (low+high)//2
    if bridges[mid][0] < l:
      low = mid+1
    else:
      high = mid-1
  trueL = low

  low = 0
  high = m-1
  while low <= high:
    mid = (low+high)//2
    if bridges[mid][0] > r:
      high = mid-1
    else:
      low = mid+1
  trueR = high
  gaps2.append((trueL,trueR))

gaps2 = [(gaps2[x], x) for x in range(n-1)]

final = [0 for x in range(n-1)]

ind = 0

q = []

valid = True

for x in range(m):
  i2 = bridges[x][1]
  if ind < n-1:
    while gaps2[ind][0][0] == x:
      heapq.heappush(q, (gaps2[ind][0][1], gaps2[ind][1]))
      ind += 1
      if ind >= n-1:
        break
  if not q:
    continue
  nxt,ind = heapq.heappop(q)
  if nxt < x:
    valid = False
    break
  else:
    final[ind] = i2

if valid:
  print('Yes')
  print(' '.join([str(x) for x in final]))
else:
  print('No')

  
    
  
