#include <bits/stdc++.h>
using namespace std;
struct Node {
  long long l, r, id;
  bool operator<(const Node& B) const {
    if (r == B.r) return l < B.l;
    return r < B.r;
  }
} f[200005];
struct TT {
  long long x, id;
  bool operator<(const TT& B) const {
    if (x != B.x) return x < B.x;
    return id < B.id;
  }
} a[200005];
long long n, m;
long long l[200005], r[200005];
long long dq;
long long ans[200005];
int main() {
  scanf("%I64d%I64d", &n, &m);
  for (int i = 1; i <= n; ++i) scanf("%I64d%I64d", &l[i], &r[i]);
  for (int i = 1; i <= m; ++i) scanf("%I64d", &a[i].x);
  for (int i = 1; i <= m; ++i) a[i].id = i;
  for (int i = 1; i < n; ++i) {
    f[i].l = l[i + 1] - r[i];
    f[i].r = r[i + 1] - l[i];
    f[i].id = i;
  }
  sort(f + 1, f + n);
  sort(a + 1, a + m + 1);
  set<TT> s;
  dq = 1;
  for (int i = 1; i < n; ++i) {
    while (dq <= m && a[dq].x <= f[i].r) {
      s.insert(a[dq]);
      dq++;
    }
    TT dqx;
    dqx.x = f[i].l;
    dqx.id = 0;
    set<TT>::iterator now = s.lower_bound(dqx);
    if (now == s.end()) {
      printf("No\n");
      return 0;
    }
    ans[f[i].id] = now->id;
    s.erase(now);
  }
  printf("Yes\n");
  for (int i = 1; i < n; ++i) printf("%I64d ", ans[i]);
  return 0;
}
