#include <bits/stdc++.h>
using namespace std;
const double EPS = 1e-9;
const int N = 2e5 + 10;
long long int l[N], r[N];
vector<int> interval_matching(
    const vector<pair<long long int, long long int> > &interval,
    const vector<long long int> &pts) {
  int n = interval.size();
  int m = pts.size();
  int pos = 0;
  int ai = 0;
  vector<pair<pair<long long int, long long int>, int> > dist(n);
  vector<pair<long long int, int> > a(m);
  vector<int> sol(n);
  for (int i = 0; i < n; i++) {
    dist[i] = pair<pair<long long int, long long int>, int>(interval[i], i);
  }
  for (int i = 0; i < m; ++i) {
    a[i] = pair<long long int, int>(pts[i], i);
  }
  sort(dist.begin(), dist.end());
  sort(a.begin(), a.end());
  priority_queue<pair<long long int, long long int>,
                 vector<pair<long long int, long long int> >,
                 greater<pair<long long int, long long int> > >
      que;
  while (ai < m) {
    pair<long long int, long long int> c = a[ai];
    pair<long long int, long long int> p = dist[pos].first;
    while (pos < n && dist[pos].first.first <= c.first) {
      que.push(pair<long long int, long long int>(dist[pos].first.second,
                                                  dist[pos].second));
      pos++;
    }
    if (que.empty()) {
      ai++;
      continue;
    }
    pair<long long int, long long int> top = que.top();
    if (c.first <= top.first) {
      sol[top.second] = c.second;
      ai++;
      que.pop();
      continue;
    }
    break;
  }
  if (pos == n && que.empty()) {
    return sol;
  }
  return vector<int>();
}
int main(void) {
  int n, m;
  cin >> n >> m;
  for (int i = (int)(0); i < (int)(n); i++) {
    cin >> l[i] >> r[i];
  }
  vector<long long int> pts(m);
  for (int i = (int)(0); i < (int)(m); i++) {
    long long int q;
    cin >> q;
    pts[i] = q;
  }
  vector<pair<long long int, long long int> > intv(n - 1);
  for (int i = (int)(0); i < (int)(n - 1); i++) {
    intv[i] =
        pair<long long int, long long int>(l[i + 1] - r[i], r[i + 1] - l[i]);
  }
  vector<int> sol = interval_matching(intv, pts);
  if (sol.size()) {
    cout << "Yes" << endl;
    for (int i = (int)(0); i < (int)(n - 1); i++) {
      cout << sol[i] + 1;
      if (i < n - 1) cout << " ";
    }
    cout << endl;
  } else {
    cout << "No" << endl;
  }
}
