#include <bits/stdc++.h>
using namespace std;
const int MXN = 256 * 1024;
int n, m;
long long il[MXN];
long long ir[MXN];
long long a[MXN];
pair<long long, long long> evn[3 * MXN];
long long xva[MXN];
int ans[MXN];
static bool solve() {
  int nenv = 0;
  for (int i = 0; i < n - 1; i++) {
    long long mv = il[i + 1] - ir[i];
    long long xv = ir[i + 1] - il[i];
    evn[nenv++] = pair<long long, long long>(mv, i);
    evn[nenv++] = pair<long long, long long>(xv, 2 * MXN + i);
    xva[i] = xv;
  }
  for (int i = 0; i < m; i++) {
    evn[nenv++] = pair<long long, long long>(a[i], MXN + i);
  }
  sort(evn, evn + nenv);
  set<pair<long long, long long> > St;
  for (int i = 0; i < nenv; i++) {
    long long pos = evn[i].first;
    int id = evn[i].second;
    if (id < MXN) {
      St.insert(pair<long long, long long>(xva[id], id));
    } else if (id < 2 * MXN) {
      id -= MXN;
      if (!St.empty()) {
        ans[St.begin()->second] = id + 1;
        St.erase(St.begin());
      }
    } else {
      id -= 2 * MXN;
      if (St.find(pair<long long, long long>(pos, id)) != St.end())
        return false;
    }
  }
  return true;
}
int main() {
  while (scanf("%d %d", &n, &m) == 2) {
    for (int i = 0; i < n; i++) {
      scanf("%lld %lld", il + i, ir + i);
    }
    for (int i = 0; i < m; i++) scanf("%lld", a + i);
    if (solve()) {
      puts("Yes");
      printf("%d", ans[0]);
      for (int i = 1; i < n - 1; i++) printf(" %d", ans[i]);
      printf("\n");
    } else {
      puts("No");
    }
  }
}
