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 <bits/stdc++.h>
using namespace std;
 
#define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define endl "\n"
#define int long long

const int N=2e5+5;
 
int n, m;
int b[N], ans[N];
pair<int, int> a[N];
pair<pair<int, int>, int> diff[N];
set<pair<int, int> > s;

bool comp(pair<pair<int, int>, int> &p1, pair<pair<int, int>, int> &p2)
{
	if(p1.first.second==p2.first.second)
		return p1.first.first<p2.first.first;
	return p1.first.second<p2.first.second;
}

int32_t main()
{
	IOS;
	cin>>n>>m;
	for(int i=1;i<=n;i++)
	{
		cin>>a[i].first>>a[i].second;
		if(i>=2)
		{
			diff[i-1].first.first=a[i].first - a[i-1].second;
			diff[i-1].first.second=a[i].second - a[i-1].first;
			diff[i-1].second=i-1;
		}
	}
	for(int i=1;i<=m;i++)
	{
		cin>>b[i];
		s.insert({b[i], i});
	}
	sort(diff+1, diff+n, comp);
	int idx=1;
	for(int i=1;i<=n-1;i++)
	{
		auto it=s.lower_bound({diff[i].first.first, 0});
		if(it==s.end() || it->first>diff[i].first.second)
		{
			cout<<"No";
			return 0;
		}
		ans[diff[i].second]=it->second;
		s.erase(it);
	}
	cout<<"Yes"<<endl;
	for(int i=1;i<=n-1;i++)
		cout<<ans[i]<<" ";
	return 0;	
}   