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.
class Node:
    def __init__(self, value):
        self.value = value
        self.left = None
        self.right = None

    def is_leaf(self):
        return (self.left is None) and (self.right is None)

    def __str__(self):
        return str(self.value)

    def __eq__(self, other):
        if self is None or other is None:
            return False
        return self.value == other.value


class BinaryTree:
    def __init__(self, values=[]):
        self.root = None
        for value in list(values):
            self.insert(value)

    def insert(self, value):
        p_node = None
        node = self.root
        while not (node is None):
            p_node = node
            if node.value <= value:
                node = node.right
            else:
                node = node.left
        if p_node is None:
            self.root = Node(value)
        elif p_node.value <= value:
            p_node.right = Node(value)
        else:
            p_node.left = Node(value)
        return self

    def search(self, value):
        node = self.root
        while not (node is None):
            if node.value == value:
                break
            if node.value <= value:
                node = node.right
            else:
                node = node.left
        return node

    def search_successor(self, node):
        if node is None:
            return None
        p_node = self.root
        while not (p_node is None):
            if p_node.left is node or p_node.right is node:
                break
            if p_node.value <= node.value:
                p_node = p_node.right
            else:
                p_node = p_node.left

        return p_node

    def remove_node(self, node):
        if node is None:
            return self
        suc = self.search_successor(node)

        if node.is_leaf():
            if suc is None:
                self.root = None
            elif suc.right is node:
                suc.right = None
            else:
                suc.left = None
            del node

        elif not(node.right is None) and node.left is None:
            if suc is None:
                self.root = node.right
            elif suc.right is node:
                suc.right = node.right
            else:
                suc.left = node.right
            del node

        elif not(node.left is None) and node.right is None:
            if suc is None:
                self.root = node.left
            elif suc.right is node:
                suc.right = node.left
            else:
                suc.left = node.left
            del node

        else:
            sup = self.left_from_node(node.right)
            node.value = sup.value
            self.remove_node(sup)
        return self

    def remove(self, value):
        node = self.search(value)
        self.remove_node(node)
        return self

    @staticmethod
    def left_from_node(node):
        p_node = None
        while not(node is None):
            p_node = node
            node = node.left
        return p_node

    def is_empty(self):
        return self.root is None

    def __len__(self):
        q = [self.root]
        counter = 0
        while len(q) > 0:
            el = q.pop(0)
            if el is None:
                continue
            q.append(el.left)
            q.append(el.right)
            counter += 1
        return counter

    def __str__(self):
        q = [self.root]
        res = []
        while len(q) > 0:
            el = q.pop(0)
            if el is None:
                continue
            q.append(el.left)
            q.append(el.right)
            res.append(str(el))
        return str(res)


class SortedSet:

    def __init__(self, elements = []):
        self.tree = BinaryTree(elements)

    def add(self, element):
        self.tree.insert(element)

    def remove(self, element):
        self.tree.remove(element)

    def pop(self):
        n = self.tree.left_from_node(self.tree.root)
        if n is None:
            return None

        value = n.value
        self.tree.remove_node(n)

        return value

    def __len__(self):
        return len(self.tree)

    def __str__(self):
        return str(self.tree)


s = SortedSet()





def read_input():
    return [int(x) for x in input().split()]


n, m = read_input()
isles = []
bridges = []

for i in range(n):
    l, r = read_input()
    isles.append((l, r))

bridges.extend(read_input())

common_list = []

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

for i in range(m):
    common_list.append((bridges[i], 0, i))

common_list.sort()

q = SortedSet()
ans = [-1 for i in range(n - 1)]

for el in common_list:
    i = el[2]
    if el[1] == -1:
        q.add((isles[i + 1][1] - isles[i][0], i))
    elif el[1] == 1:
        r_to_remove = (isles[i + 1][1] - isles[i][0], i)
        q.remove((isles[i + 1][1] - isles[i][0], i))
    elif len(q) > 0:
        n_b = q.pop()[1]
        ans[n_b] = i + 1
        # print(q)

# print('bridges', bridges)
# print('isles', isles)
# print('common', common_list)

for i in ans:
    if i == -1:
        print('No')
        exit()

print('Yes')
print(' '.join(str(x) for x in ans))