#include <bits/stdc++.h>
using namespace std;
long long lisland[200000], risland[200000];
long long len[200000];
pair<long long, int> a[200000];
bool used[200000] = {false};
pair<int, int> res[200000];
struct edge_gap {
  int l, r, id;
  bool operator<(const edge_gap& rhs) const {
    if (r != rhs.r)
      return r < rhs.r;
    else
      return l < rhs.l;
  }
};
edge_gap gaps[200000];
int main() {
  ios::sync_with_stdio(false);
  long long nisland, mwood;
  cin >> nisland >> mwood;
  for (int i = 0; i < nisland; i++) cin >> lisland[i] >> risland[i];
  for (int i = 0; i < mwood; i++) {
    cin >> a[i].first;
    a[i].second = i + 1;
  }
  sort(a, a + mwood);
  for (int i = 0; i < mwood; i++) len[i] = a[i].first;
  for (int i = 0; i < nisland - 1; i++) {
    long long min_len = lisland[i + 1] - risland[i];
    long long max_len = risland[i + 1] - lisland[i];
    gaps[i].l = lower_bound(len, len + mwood, min_len) - len;
    gaps[i].r = upper_bound(len, len + mwood, max_len) - len - 1;
    gaps[i].id = i;
  }
  sort(gaps, gaps + nisland - 1);
  set<int> points;
  for (int i = 0; i < mwood; i++) points.insert(i);
  bool flag = true;
  int j = 0;
  for (int i = 0; i < nisland - 1 && flag; i++) {
    auto pt = points.lower_bound(gaps[i].l);
    if (pt != points.end() && *pt <= gaps[i].r) {
      res[i].first = gaps[i].id;
      res[i].second = a[*pt].second;
      points.erase(pt);
    } else
      flag = false;
  }
  if (flag) {
    cout << "Yes" << endl;
    sort(res, res + nisland - 1);
    for (int i = 0; i < nisland - 1; i++) cout << res[i].second << " ";
  } else
    cout << "No" << endl;
  return 0;
}
