#include <bits/stdc++.h>
using namespace std;
const long long N = 2e5 + 9;
long long n, m;
long long l[N], r[N], ans[N];
vector<pair<long long, long long> > st[N];
multiset<pair<long long, long long> > cur;
pair<long long, long long> a[N];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cerr << "‌";
  cin >> n >> m;
  for (int i = 0; i < (n); i++) cin >> l[i] >> r[i];
  for (int i = 0; i < (m); i++) cin >> a[i].first, a[i].second = i;
  sort(a, a + m);
  for (long long i = 1; i < n; i++) {
    long long lo = l[i] - r[i - 1];
    long long hi = r[i] - l[i - 1];
    pair<long long, long long> g1 = {lo, -10}, g2 = {hi, 1e10};
    long long p1 = lower_bound(a, a + m, g1) - a;
    long long p2 = upper_bound(a, a + m, g2) - a - 1;
    if (a[p1].first > hi || a[p2].first < lo) {
      cout << "No";
      return 0;
    }
    st[p1].push_back({p2, i - 1});
  }
  fill(ans, ans + N, -1);
  for (int i = 0; i < (m); i++) {
    for (auto it : st[i]) cur.insert(it);
    if (cur.size()) {
      long long id = (*cur.begin()).second;
      long long val = (*cur.begin()).first;
      if (val < i) {
        cout << "No";
        return 0;
      }
      ans[id] = a[i].second;
      cur.erase(cur.begin());
    }
  }
  long long ok = 1;
  for (int i = 0; i < (n - 1); i++)
    if (ans[i] == -1) ok = 0;
  if (!ok)
    cout << "No";
  else {
    cout << "Yes\n";
    for (int i = 0; i < (n - 1); i++) cout << ans[i] + 1 << ' ';
  }
}
