#include <bits/stdc++.h>
using namespace std;
map<long long, vector<long long>> c;
struct ppp {
  long long l, r, v;
} p[200005];
long long l[200005], r[200005], a[200005], ans[200005];
bool cmp(ppp x, ppp y) {
  if (x.r == y.r) return x.l < y.l;
  return x.r < y.r;
}
int main() {
  long long n, m;
  cin >> n >> m;
  for (long long i = 1; i <= n; i++) {
    cin >> l[i] >> r[i];
  }
  for (long long i = 1; i < n; i++) {
    p[i].l = l[i + 1] - r[i];
    p[i].r = r[i + 1] - l[i];
    p[i].v = i;
  }
  multiset<long long> s;
  for (long long i = 1; i <= m; i++) {
    cin >> a[i];
    c[a[i]].push_back(i);
    s.insert(a[i]);
  }
  sort(p + 1, p + n, cmp);
  for (long long i = 1; i < n; i++) {
    long long x = *s.lower_bound(p[i].l);
    if (x > p[i].r || c[x].size() == 0) {
      cout << "No" << endl;
      return 0;
    } else {
      long long pos = *c[x].rbegin();
      c[x].pop_back();
      s.erase(s.lower_bound(x));
      ans[p[i].v] = pos;
    }
  }
  cout << "Yes" << endl;
  for (long long i = 1; i < n; i++) {
    cout << ans[i] << " ";
  }
  cout << endl;
}
