#include <bits/stdc++.h>
using namespace std;
const int mo = 1e9 + 7, N = 3e5 + 10;
int pow(int a, int b, int c) {
  int ret = 1;
  for (; b; b >>= 1, a = 1LL * a * a % c)
    if (b & 1) ret = 1LL * ret * a % c;
  return ret;
}
int n, m;
long long l[N], r[N];
struct node {
  long long l, r;
  int id;
  bool operator<(const node &a) const { return r > a.r; }
} a[N];
priority_queue<node> q;
struct point {
  long long v;
  int id;
} b[N];
bool cmp1(const node &a, const node &b) {
  if (a.l == b.l)
    return a.r < b.r;
  else
    return a.l < b.l;
}
bool cmp(const point &a, const point &b) { return a.v < b.v; }
int ans[N];
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= n; i++) {
    scanf("%I64d%I64d", &l[i], &r[i]);
  }
  for (int i = 1; i < n; i++) {
    a[i] = (node){l[i + 1] - r[i], r[i + 1] - l[i], i};
  }
  for (int i = 1; i <= m; i++) {
    scanf("%I64d", &b[i].v);
    b[i].id = i;
  }
  sort(a + 1, a + n, cmp1);
  sort(b + 1, b + m + 1, cmp);
  int j = 1;
  for (int i = 1; i <= m; i++) {
    while (j < n && a[j].l <= b[i].v) q.push(a[j++]);
    if (!q.empty()) {
      node u = q.top();
      q.pop();
      if (u.r < b[i].v) {
        printf("No\n");
        return 0;
      }
      ans[u.id] = b[i].id;
    }
  }
  int fail = 0;
  for (int i = 1; i < n; i++)
    if (!ans[i]) fail = 1;
  if (fail) {
    printf("No\n");
    return 0;
  }
  printf("Yes\n");
  for (int i = 1; i < n; i++) printf("%d ", ans[i]);
  return 0;
}
