#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  long long n, m, i, j, k, x, a, b, c, id, bid;
  cin >> n >> m;
  vector<long long> l(n + 1), r(n + 1);
  map<long long, vector<pair<long long, long long>>> inlist, outlist,
      bridgelist;
  for (i = 1; i <= n; i++) {
    cin >> l[i] >> r[i];
    if (i > 1) {
      a = l[i] - r[i - 1];
      b = r[i] - l[i - 1];
      inlist[a].push_back({b, i});
      outlist[b].push_back({b, i});
    }
  }
  for (i = 0; i < m; i++) {
    cin >> x;
    bridgelist[x].push_back({i + 1, i + 1});
  }
  bool solved = true;
  set<pair<long long, long long>> ss;
  vector<long long> ans(n + 1, -1);
  for (auto p : bridgelist) {
    x = p.first;
    while (!inlist.empty() && (inlist.begin()->first <= x)) {
      for (auto pp : inlist.begin()->second) ss.insert(pp);
      inlist.erase(inlist.begin());
    }
    while (!outlist.empty() && (outlist.begin()->first < x)) {
      for (auto pp : outlist.begin()->second) {
        id = pp.second;
        if (ans[id] == -1) solved = false;
        ss.erase(pp);
      }
      outlist.erase(outlist.begin());
    }
    for (auto bid : p.second) {
      if (!ss.empty()) {
        id = ss.begin()->second;
        ss.erase(ss.begin());
        ans[id] = bid.first;
      }
    }
  }
  for (i = 2; i <= n; i++) {
    if (ans[i] == -1) solved = false;
  }
  if (!solved)
    cout << "No\n";
  else {
    cout << "Yes\n";
    for (i = 2; i <= n; i++) cout << ans[i] << " ";
    cout << "\n";
  }
  return 0;
}
