#include <bits/stdc++.h>
using namespace std;
template <class T>
int readInt(T &x) {
  bool minus = false;
  T result = 0;
  char ch;
  ch = getchar();
  while (true) {
    if (ch == '-') break;
    if (ch >= '0' && ch <= '9') break;
    ch = getchar();
  }
  if (ch == '-')
    minus = true;
  else
    result = ch - '0';
  while (true) {
    ch = getchar();
    if (ch < '0' || ch > '9') break;
    result = result * 10 + (ch - '0');
  }
  if (minus)
    x = -result;
  else
    x = result;
  return 0;
}
long long comb[4001][4001];
int ncr() {
  int i, j;
  for (i = 0; i < 4001; i++) comb[i][0] = comb[0][i] = comb[i][i] = 1;
  for (i = 1; i < 4001; i++)
    for (j = 1; j < i; j++)
      comb[i][j] = (comb[i - 1][j - 1] + comb[i - 1][j]) % (1000000007);
  return 1;
}
const int MAXN = 1e6 + 5;
pair<long long, long long> a[MAXN];
priority_queue<pair<long long, long long> > q;
int ans[MAXN];
map<long long, vector<int> > b;
int main() {
  long long n, m, i, x;
  readInt(n);
  readInt(m);
  for (i = 0; i < n; i++) {
    readInt(a[i].first);
    readInt(a[i].second);
  }
  for (i = 0; i < n - 1; i++)
    q.push(make_pair(a[i + 1].first - a[i].second, i));
  for (i = 0; i < m; i++) {
    readInt(x);
    b[x].push_back(i);
  }
  while (!q.empty()) {
    auto t = q.top();
    q.pop();
    long long min_gap = t.first;
    long long max_gap = a[t.second + 1].second - a[t.second].first;
    auto it = b.lower_bound(min_gap);
    if (it == b.end()) {
      cout << "No";
      return 0;
    }
    auto it2 = b.lower_bound(max_gap);
    if (it2 != b.begin() || (it2 != b.end() && it2->first == max_gap)) {
      if (it2->first != max_gap) --it2;
      long long gap = it2->first;
      if (gap >= min_gap) {
        long long idx = b[gap].back();
        b[gap].pop_back();
        if (b[gap].empty()) b.erase(gap);
        ans[t.second] = idx;
      } else {
        cout << "No";
        return 0;
      }
    } else {
      cout << "No";
      return 0;
    }
  }
  cout << "Yes\n";
  for (i = 0; i < n - 1; i++) cout << ans[i] + 1 << " ";
}
