#include <bits/stdc++.h>
using namespace std;
template <typename T>
ostream& operator<<(ostream& out, const vector<T>& v) {
  int ss = ((int)(v).size());
  for (int(i) = 0; (i) < (ss); ++(i)) out << v[i] << " ";
  return out;
}
template <typename T, typename TT>
ostream& operator<<(ostream& out, const pair<T, TT>& p) {
  out << p.first << " " << p.second;
  return out;
}
template <typename T, typename TT>
istream& operator>>(istream& in, pair<T, TT>& s) {
  in >> s.first >> s.second;
  return in;
}
template <typename T>
bitset<sizeof(T) * 8> BIN(T a) {
  return bitset<sizeof(T) * 8>(a);
}
int which[1000000];
int main() {
  int n, m;
  cin >> n >> m;
  vector<pair<long long, long long> > allSeg;
  vector<pair<long long, long long> > bridges;
  vector<pair<long long, long long> > all;
  allSeg.push_back(make_pair(-1ll, -1ll));
  bridges.push_back(make_pair(-1ll, -1ll));
  long long lasta = -1ll, lastb = -1ll;
  for (int i = 1; i <= n; i++) {
    long long a, b;
    ;
    cin >> a >> b;
    if (lasta != -1ll) {
      allSeg.push_back(make_pair(a - lastb, b - lasta));
      all.push_back(make_pair(a - lastb, -(i - 1)));
    }
    lasta = a;
    lastb = b;
  }
  for (int i = 1; i <= m; i++) {
    long long a;
    cin >> a;
    bridges.push_back(make_pair(a, i));
    all.push_back(make_pair(a, i));
  }
  sort(all.begin(), all.end());
  priority_queue<pair<long long, long long>,
                 vector<pair<long long, long long> >,
                 greater<pair<long long, long long> > >
      pq;
  int f = 1;
  int num = 0;
  for (auto it : all) {
    long long type = it.second;
    long long start = it.first;
    if (type < 0) {
      pq.push(make_pair(allSeg[-type].second, -type));
    } else {
      if (!pq.empty()) {
        long long end = pq.top().first;
        long long index = pq.top().second;
        pq.pop();
        if (end < start) {
          f = 0;
          break;
        } else {
          num++;
          which[index] = type;
        }
      }
    }
  }
  if (f && num == (n - 1)) {
    cout << "Yes" << endl;
    for (int i = 1; i < n; i++) {
      cout << which[i] << " ";
    }
    cout << endl;
  } else {
    cout << "No" << endl;
  }
  return 0;
}
