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.
#include <iostream>
#include <stdio.h>
#include <algorithm>
#include <vector>
#include <queue>
#include <stack>
#include <set>
#include <map>
#include <cmath>
#include <string>
#include <cstring>
#include <cassert>
#include <cstdlib>
#include <numeric>
#include <bitset>
#include <deque>
#define mp make_pair
#define mt make_tuple
#define pb push_back
#define y1 y1_dhs
#define NAME ""

using namespace std;

typedef long long ll;
typedef long double ld;

template<typename T1, typename T2>
ostream& operator << (ostream &out, pair<T1, T2> a) {
	return (out << "(" << a.first << "; " << a.second << ")");
}

template<typename T1>
ostream& operator << (ostream &cout, vector<T1> &a) {
	if ((int)a.size() == 0)
		return (cout << "()");
	cout << "(" << a[0];
	for (int i = 1; i < (int)a.size(); i++)
		cout << "; " << a[i];
	cout << ")";
	return cout;
}

const int nmax = 1000 * 1000;
const int inf = 1000 * 1000 * 1000;
const int mod = 1000 * 1000 * 1000 + 7;
const ld pi = acos(-1.0);
const ll infl = 1000ll * 1000ll * 1000ll * 1000ll * 1000ll * 1000ll;

struct node {
	ll l, r, ind;
	node(){}
	node(ll L, ll R, int Ind) {
		l = L;
		r = R;
		ind = Ind;
	}
};

inline bool cmp(node a, node b) {
	return a.l + a.r < b.l + b.r;
}

ll n, m, ans[nmax];
vector<pair<ll, ll> > a, br;
vector<node> pr;

int main() {
	//freopen(NAME".in", "r", stdin);freopen(NAME".out", "w", stdout);
	//freopen("input.txt", "r", stdin);freopen("output.txt", "w", stdout);
	cin >> n >> m;
	a.resize(n);
	for (int i = 0; i < n; i++) {
		scanf("%d%d", &a[i].first, &a[i].second);
	}
	pr.resize(n - 1);
	for (int i = 0; i < n - 1; i++) {
		pr[i] = node(a[i + 1].first - a[i].second, a[i + 1].second - a[i].first, i);
	}
	br.resize(m);
	for (int i = 0; i < m; i++) {
		scanf("%d", &br[i].first);
		br[i].second = i;
	}
	sort(pr.begin(), pr.end(), cmp);
	sort(br.begin(), br.end());
	int ind = 0;
	for (int i = 0; i < (int)pr.size(); i++) {
		while (ind < (int)br.size() && !(pr[i].l <= br[ind].first && br[ind].first <= pr[i].r)) {
			ind++;
		}
		if (ind == (int)br.size()) {
			cout << "No\n";
			return 0;
		}
		ans[pr[i].ind] = br[ind].second;
		ind++;
	}
	cout << "Yes\n";
	for (int i = 0; i < n - 1; i++) {
		cout << ans[i] + 1 << " ";
	}
}

