#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:102400000,102400000")
using namespace std;
struct island {
  long long mx, mn;
  int i;
};
bool cmp(island a, island b) {
  return a.mn > b.mn || a.mn == b.mn && a.mx > b.mx;
}
island IS[199999];
long long len;
int ans[199999];
multimap<long long, int> M;
multimap<long long, int>::iterator itm;
multiset<long long> S;
multiset<long long>::iterator its;
int main() {
  int n, m, i, j;
  long long lp, rp, l, r;
  while (scanf("%d%d", &n, &m) != EOF) {
    S.clear();
    M.clear();
    scanf("%I64d%I64d", &lp, &rp);
    for (i = 0; i < n - 1; i++) {
      scanf("%I64d%I64d", &l, &r);
      IS[i].mx = r - lp;
      IS[i].mn = l - rp;
      IS[i].i = i;
      lp = l;
      rp = r;
    }
    for (i = 0; i < m; i++) {
      scanf("%I64d", &len);
      M.insert(make_pair(len, i));
      S.insert(len);
    }
    if (n > m + 1) {
      printf("No\n");
      goto end;
    }
    sort(IS, IS + n - 1, cmp);
    for (i = 0; i < n - 1; i++) {
      its = S.find(IS[i].mx);
      if (its == S.end()) {
        its = S.upper_bound(IS[i].mx);
        if (its == S.begin()) {
          printf("No\n");
          goto end;
        }
        its--;
      }
      l = *its;
      if (l < IS[i].mn) {
        printf("No\n");
        goto end;
      }
      S.erase(its);
      itm = M.find(l);
      ans[IS[i].i] = itm->second + 1;
      M.erase(itm);
    }
    printf("Yes\n");
    printf("%d", ans[0]);
    for (i = 1; i < n - 1; i++) printf(" %d", ans[i]);
    printf("\n");
  end:;
  }
  return 0;
}
