#include <bits/stdc++.h>
using namespace std;
set<pair<long long, int> > S;
struct island {
  long long l, r;
  int o;
  inline bool operator<(const island t) const { return r < t.r; }
};
island g[500000];
pair<long long, int> t;
long long q[500000], x[500000], y[500000], z[500000];
int i, m, n;
int main() {
  scanf("%d%d", &n, &m);
  for (i = 1; i <= n; i++) scanf("%I64d%I64d", &x[i], &y[i]);
  for (i = 1; i < n; i++)
    g[i].l = x[i + 1] - y[i], g[i].r = y[i + 1] - x[i], g[i].o = i;
  n--;
  sort(g + 1, g + n + 1);
  for (i = 1; i <= m; i++) scanf("%I64d", &z[i]), S.insert(make_pair(z[i], i));
  for (i = 1; i <= n; i++) {
    t = *S.lower_bound(make_pair(g[i].l, 0));
    if ((S.lower_bound(make_pair(g[i].l, 0)) == S.end()) ||
        (t.first > g[i].r)) {
      printf("No\n");
      return 0;
    }
    q[g[i].o] = t.second;
    S.erase(t);
  }
  printf("Yes\n");
  for (i = 1; i <= n; i++) printf("%I64d ", q[i]);
  return 0;
}
