#include <bits/stdc++.h>
using namespace std;
long long oo = 1e9 + 7;
long long n, m;
long long lef[200008], rig[200008];
long long a[200008];
set<pair<long long, long long> > b;
set<pair<long long, long long> >::iterator it;
vector<pair<pair<long long, long long>, long long> > seg;
int ans[200008];
int main() {
  scanf("%lld", &n), scanf("%lld", &m);
  for (int i = 1; i <= n; i++) {
    scanf("%lld", &lef[i]);
    scanf("%lld", &rig[i]);
  }
  for (int i = 1; i <= m; i++) scanf("%lld", &a[i]);
  for (int i = 1; i < n; i++) {
    long long st = lef[i + 1] - rig[i];
    long long nd = rig[i + 1] - lef[i];
    seg.push_back(pair<pair<long long, long long>, long long>(
        pair<long long, long long>(st, nd), i));
  }
  sort(seg.begin(), seg.end());
  reverse(seg.begin(), seg.end());
  for (int i = 1; i <= m; i++) {
    b.insert(pair<long long, long long>(a[i], i));
  }
  int i = 0;
  int j = 0;
  for (; i < n - 1; i++) {
    it = b.upper_bound(pair<long long, long long>(seg[i].first.second, oo));
    if (it == b.begin()) break;
    --it;
    if (it->first < seg[i].first.first) break;
    ans[seg[i].second] = it->second;
    b.erase(it);
  }
  if (i < n - 1) {
    printf("No");
    return 0;
  }
  printf("Yes\n");
  for (int i = 1; i <= n - 1; i++) printf("%d ", (int)ans[i]);
}
