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.
//Done by Ferran Alet

#include<bits/stdc++.h>

#define INF 2147483647
#define LINF 1000000000000000000LL
#define EPS 1e-9
#define debug(x) //cerr << #x << " = " << x << endl
#define Debug(v) //cerr << #v << " = "; for(ll wow=0;wow<v.size();++wow) //cerr<<v[wow]<<' '; //cerr<<endl
#define DEBUG(M) //cerr << #M <<":"<<endl; for(ll iM=0;iM<M.size();++iM) { for(ll jM=0;jM<M[iM].size();++jM) //cerr<<M[iM][jM]<<' '; //cerr<<endl;} //cerr<<endl
#define FOR(x,y) for(ll x=0;x<y;x++)
#define FORS(x,y) for(ll x=0;x<ll(y.size());++x)
#define FORU(x,y) for(ll x=1;x<=y;x++)
#define RFOR(x,y) for(ll x=y-1;x>=0;--x)
#define DRI(x) ll x; cin>>x
#define DRII(x,y) ll x,y; cin>>x>>y
#define DRIII(x,y,z) ll x,y,z; cin>>x>>y>>z
#define PB push_back
#define SZ(X) ((ll)(X).size())
#define ALL(X) (X).begin(), (X).end()

using namespace std;

typedef long long ll;
typedef long double ld;
typedef pair<ll,ll> PII;
typedef vector<ll> VI;
typedef vector<VI> VVI;
typedef vector<double> VD;
typedef vector<VD> VVD;
typedef vector<bool> VB;
typedef vector<VB> VVB;
typedef vector<char> VC;
typedef vector<VC> VVC;
typedef vector<string> VS;
typedef map<ll,ll> MII;
typedef MII::iterator iMII;
typedef vector<PII > VP;
typedef vector<VP> VVP;

int main(){
    ios_base::sync_with_stdio(false);
    cin.tie(0);
//  freopen(".out","w",stdout);
//  freopen(".in","r",stdin);
    ll n,m;
    cin>>n>>m;
    vector<PII> v(n);
    FOR(i,n) cin>>v[i].first>>v[i].second;
    vector<PII> b(m);
    FOR(i,m) {
      cin>>b[i].first;
      b[i].second=i+1;
    }
    sort(b.begin(),b.end());
    vector<pair<PII,ll> > diff(n-1);
    FORU(i,n-1){
      diff[i-1].first = PII(v[i].first-v[i-1].second,v[i].second-v[i-1].first);
      diff[i-1].second = i;
    }
    sort(diff.begin(),diff.end());
    vector<PII> ev;
    FOR(i,diff.size()){
      ev.push_back(PII(diff[i].first.first,diff[i].second));
      //cerr<<"Introdueixo " << diff[i].first.first<<' '<<diff[i].second<<endl;
      ev.push_back(PII(diff[i].first.second+1,-diff[i].second));
      //cerr<<"Introdueixa " << diff[i].first.second+1<<' '<<diff[i].second<<endl;
    }
    FOR(i,m){
      ev.push_back(PII(b[i].first,1000000+b[i].second));
    }
    sort(ev.begin(),ev.end());
    bool result=true;
    VI found(n);
    priority_queue<PII> pq;
    //cerr<<"Processo events"<<endl;
    FOR(i,ev.size()){
      //cerr<<i<<' ' <<ev[i].first<<' '<<ev[i].second<<endl;
      if(ev[i].second<0){ //S'acaba
        if(!found[-ev[i].second]){
          result=false;
          break;
        }
      }
      else if(ev[i].second>=1000000){
        ev[i].second-=1000000;
        if(!pq.empty()){
          PII x=pq.top();
          pq.pop();
          found[x.second]=ev[i].second;
        }
      }
      else {
        pq.push(PII(-ev[i].first,ev[i].second));
      }
    }
    if(!result) cout<<"No"<<endl;
    else{
      cout<<"Yes"<<endl;
      FORU(i,n-1) cout<<found[i]<<' ';
      cout<<endl;
    }
}