#include <bits/stdc++.h>
using namespace std;
const int MAXN = 2e5 + 10;
long long l[MAXN], r[MAXN];
long long ans[MAXN];
set<pair<long long, long long> > s, bri, mi;
int main() {
  ios_base::sync_with_stdio(false);
  int n, m;
  cin >> n >> m;
  for (int i = 1; i <= n; i++) cin >> l[i] >> r[i];
  for (int i = 1; i < n; i++)
    mi.insert(pair<long long, long long>(l[i + 1] - r[i], i));
  for (int i = 1; i <= m; i++) {
    long long t;
    cin >> t;
    bri.insert(pair<long long, long long>(t, i));
  }
  int cpn = n;
  while (bri.size()) {
    long long le = bri.begin()->first;
    while (mi.size()) {
      pair<long long, long long> p = *mi.begin();
      if (p.first <= le) {
        int id = p.second;
        s.insert(pair<long long, long long>(r[id + 1] - l[id], id));
        mi.erase(mi.begin());
      } else
        break;
    }
    set<pair<long long, long long> >::iterator it =
        s.lower_bound(pair<long long, long long>(le, -1));
    if (it == s.end()) {
      bri.erase(bri.begin());
      continue;
    }
    int id = it->second;
    ans[id] = bri.begin()->second;
    s.erase(*it);
    bri.erase(bri.begin());
  }
  for (int i = 1; i < n; i++)
    if (!ans[i]) {
      cout << "No\n";
      return 0;
    }
  cout << "Yes\n";
  for (int i = 1; i < n; i++) cout << ans[i] << " ";
  return 0;
}
