#include <bits/stdc++.h>
using namespace std;
struct info {
  long long l, r, i;
  info(long long a, long long b, long long c) {
    l = a;
    r = b, i = c;
  }
};
vector<info> rang;
pair<long long, long long> point[200007];
long long output[200007];
set<pair<long long, long long> > bridgesz;
bool cmp(info a, info b) {
  if (a.r != b.r) return a.r < b.r;
  return a.l < b.l;
}
bool cmp2(pair<long long, long long> a, pair<long long, long long> b) {
  if (a.first != b.first) return a.first < b.first;
  return a.second < b.second;
}
int main() {
  long long n, m, pl, pr, nl, nr, tmp;
  cin >> n >> m;
  cin >> pl >> pr;
  for (int i = 0; i < n - 1; ++i) {
    cin >> nl >> nr;
    long long mn = nl - pr;
    long long mx = nr - pl;
    rang.push_back(info(mn, mx, i));
    pr = nr;
    pl = nl;
  }
  sort(rang.begin(), rang.end(), cmp);
  for (int i = 0; i < m; ++i) {
    cin >> tmp;
    bridgesz.insert(make_pair(tmp, i));
  }
  int j = 0;
  for (int i = 0; i < n - 1; ++i) {
    auto lb = bridgesz.lower_bound(make_pair(rang[i].l, 0));
    if (lb == bridgesz.end() || (*lb).first > rang[i].r) {
      cout << "No\n";
      return 0;
    }
    output[rang[i].i] = (*lb).second;
    bridgesz.erase(*lb);
  }
  cout << "Yes" << endl;
  for (int i = 0; i < n - 1; ++i) {
    cout << output[i] + 1 << " ";
  }
  return 0;
}
