#include <bits/stdc++.h>
using namespace std;
int main(void) {
  int n, m;
  cin >> n >> m;
  vector<int64_t> l(n), r(n), a(m);
  for (int i = 0; i < n; ++i) {
    cin >> l[i] >> r[i];
  }
  multiset<int64_t> w;
  map<int64_t, set<int> > h;
  vector<int64_t> u;
  for (int i = 0; i < m; ++i) {
    cin >> a[i];
    w.insert(a[i]);
    h[a[i]].insert(i);
    u.push_back(a[i]);
  }
  sort(u.begin(), u.end());
  vector<pair<pair<int64_t, int64_t>, pair<int64_t, int> > > v(n - 1);
  for (int i = 0; i < n - 1; ++i) {
    int64_t cur = l[i + 1] - r[i];
    int64_t cur_max = r[i + 1] - l[i];
    v[i] = {{cur_max, cur}, {cur, i}};
  }
  sort(v.begin(), v.end());
  vector<int> ans(n - 1);
  for (int i = 0; i < n - 1; ++i) {
    int64_t cur = v[i].second.first;
    auto it = w.lower_bound(cur);
    if (it == w.end()) {
      cout << "No";
      return 0;
    }
    int64_t use = *it;
    if (r[v[i].second.second + 1] - l[v[i].second.second] < use) {
      cout << "No";
      return 0;
    }
    ans[v[i].second.second] = *h[use].begin();
    h[use].erase(h[use].begin());
    w.erase(w.find(use));
  }
  cout << "Yes" << endl;
  for (int i = 0; i < n - 1; ++i) {
    cout << ans[i] + 1 << " ";
  }
  return 0;
}
