#include <bits/stdc++.h>
using namespace std;
int N, M;
pair<pair<long long, long long>, int> range[200000 - 1];
pair<long long, int> bridge[200000];
priority_queue<pair<long long, int>, vector<pair<long long, int> >,
               greater<pair<long long, int> > >
    rends;
int ans[200000 - 1];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cin >> N >> M;
  long long prevL, prevR;
  cin >> prevL >> prevR;
  for (int i = 0; i < N - 1; i++) {
    long long L, R;
    cin >> L >> R;
    range[i] = {{L - prevR, R - prevL}, i};
    prevL = L;
    prevR = R;
  }
  for (int i = 0; i < M; i++) {
    cin >> bridge[i].first;
    bridge[i].second = i;
  }
  sort(range, range + N - 1);
  sort(bridge, bridge + M);
  int ind = 0;
  for (int i = 0; i < M; i++) {
    while (ind < N - 1 && bridge[i].first >= range[ind].first.first) {
      rends.push(make_pair(range[ind].first.second, range[ind].second));
      ind++;
    }
    if (!rends.empty()) {
      pair<long long, int> e = rends.top();
      rends.pop();
      if (e.first >= bridge[i].first) {
        ans[e.second] = bridge[i].second + 1;
      } else {
        cout << "No" << endl;
        return 0;
      }
    }
  }
  if (ind < N - 1 || !rends.empty()) {
    cout << "No" << endl;
    return 0;
  }
  cout << "Yes" << '\n';
  cout << ans[0];
  for (int i = 1; i < N - 1; i++) {
    cout << ' ' << ans[i];
  }
  cout << endl;
  return 0;
}
