#include <bits/stdc++.h>
using namespace std;
const long long N = 200010;
const long long M = 200010;
const long long INF = 1061109567;
inline long long read() {
  long long x = 0;
  long long w = 1;
  register long long c = getchar();
  while (c ^ '-' && (c < '0' || c > '9')) c = getchar();
  if (c == '-') w = -1, c = getchar();
  while (c >= '0' && c <= '9') x = (x << 3) + (x << 1) + c - '0', c = getchar();
  return x * w;
}
struct Island {
  long long l, r;
} a[N];
struct Dist {
  long long min, max, idx;
  friend bool operator<(Dist a, Dist b) { return a.max > b.max; }
} b[N];
struct Bridge {
  long long len, idx;
} bri[M];
long long n, m, top, cnt;
long long ans[N];
priority_queue<Dist> q;
inline bool comp_dist(Dist& a, Dist& b) {
  if (a.min != b.min) return a.min < b.min;
  return a.max < b.max;
}
inline bool comp_bridge(Bridge& a, Bridge& b) { return a.len < b.len; }
int main() {
  n = read(), m = read();
  for (long long i = 1; i <= n; ++i) {
    a[i].l = read();
    a[i].r = read();
  }
  for (long long i = 1; i <= m; ++i) {
    bri[i].len = read();
    bri[i].idx = i;
  }
  for (long long i = 1; i < n; ++i) {
    b[i].max = a[i + 1].r - a[i].l;
    b[i].min = a[i + 1].l - a[i].r;
    b[i].idx = i;
  }
  sort(b + 1, b + n, comp_dist);
  sort(bri + 1, bri + m + 1, comp_bridge);
  long long lst = 1;
  for (long long i = 1; i <= m; ++i) {
    if (cnt >= n - 1) break;
    while (lst < n && b[lst].min <= bri[i].len && bri[i].len <= b[lst].max) {
      q.push(b[lst]);
      ++lst;
    }
    if (!q.size()) continue;
    Dist tmp = q.top();
    q.pop();
    if (bri[i].len <= tmp.max) {
      ans[tmp.idx] = bri[i].idx;
      ++cnt;
    } else {
      printf("No");
      return 0;
    }
  }
  if (cnt < n - 1) {
    printf("No");
    return 0;
  }
  printf("Yes\n");
  for (long long i = 1; i < n; ++i) {
    printf("%lld ", ans[i]);
  }
  return 0;
}
