#include <bits/stdc++.h>
using namespace std;
pair<long long, long long> a[200005];
long long b[200005];
bool comp(const tuple<long long, long long, long long> &a,
          const tuple<long long, long long, long long> &b) {
  if (get<1>(a) == get<1>(b)) return get<0>(a) < get<0>(b);
  return get<1>(a) < get<1>(b);
}
int main() {
  long long n, i, k, m, tmp, res = 0, ii;
  cin >> n >> m;
  for (i = 0; i < n; i++) cin >> a[i].first >> a[i].second;
  vector<pair<long long, long long>> v;
  for (i = 0; i < m; i++) {
    long long x;
    cin >> x;
    v.push_back(make_pair(x, i + 1));
  }
  vector<tuple<long long, long long, long long>> vt;
  for (i = 0; i < n - 1; i++) {
    long long l = a[i + 1].first - a[i].second;
    long long r = a[i + 1].second - a[i].first;
    vt.emplace_back(l, r, i);
  }
  sort((v).begin(), (v).end());
  sort((vt).begin(), (vt).end(), comp);
  set<pair<long long, long long>> s;
  long long j = 0;
  for (auto &g : vt) {
    long long l, r, i;
    tie(l, r, i) = g;
    while (j < m and v[j].first <= r) {
      s.insert(v[j]);
      j++;
    }
    auto it = s.lower_bound(make_pair(l, 0));
    if (it != s.end()) {
      b[i] = (*it).second;
      s.erase(it);
    } else {
      cout << "No";
      return 0;
    }
  }
  cout << "Yes\n";
  for (i = 0; i < n - 1; i++) cout << b[i] << " ";
  return 0;
}
