#include <bits/stdc++.h>
using namespace std;
long long l[200005], r[200005];
pair<long long, int> b[200005];
map<long long, vector<int> > small;
map<pair<long long, int>, long long> large;
int ans[200005];
int main() {
  ios::sync_with_stdio(false);
  int n, m;
  cin >> n >> m;
  for (int i = 0; i < n; i++) {
    cin >> l[i] >> r[i];
  }
  for (int i = 0; i < n - 1; i++) {
    small[l[i + 1] - r[i]].push_back(i);
  }
  for (int i = 0; i < m; i++) {
    cin >> b[i].first;
    b[i].second = i;
  }
  int c = 0;
  sort(b, b + m);
  for (int i = 0; i < m; i++) {
    while (small.size() && small.begin()->first <= b[i].first) {
      vector<int>& v = small.begin()->second;
      long long k = small.begin()->first;
      for (int j = 0; j < v.size(); j++) {
        large[{r[v[j] + 1] - l[v[j]], v[j]}] = k;
      }
      small.erase(small.begin());
    }
    if (large.size()) {
      pair<pair<long long, int>, long long> p = *(large.begin());
      long long x = p.first.first;
      long long y = p.second;
      if (b[i].first >= y && b[i].first <= x) {
        ans[p.first.second] = b[i].second;
        large.erase(large.begin());
        c++;
      }
    }
  }
  if (c < n - 1) {
    cout << "No" << endl;
    return 0;
  }
  cout << "Yes" << endl;
  for (int i = 0; i < n - 1; i++) {
    cout << ans[i] + 1 << " ";
  }
  return 0;
}
