#include <bits/stdc++.h>
using namespace std;
struct island {
  long long u, v;
};
struct bg {
  long long u, v;
  int cs;
};
const int nm = 200002;
int n, m;
island a[nm];
bg c[nm];
int kq[nm];
set<pair<long long, int> > b;
bool cmp2(bg a, bg b) {
  if (a.v != b.v) return a.v < b.v;
  return a.u < b.u;
}
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= n; ++i) scanf("%I64d%I64d", &a[i].u, &a[i].v);
  for (int i = 1; i <= m; ++i) {
    long long x;
    scanf("%I64d", &x);
    b.insert(make_pair(x, i));
  }
  for (int i = 1; i < n; ++i) {
    c[i].u = a[i + 1].u - a[i].v;
    c[i].v = a[i + 1].v - a[i].u;
    c[i].cs = i;
  }
  sort(c + 1, c + n, cmp2);
  for (int i = 1; i < n; ++i) {
    set<pair<long long, int> >::iterator it =
        b.lower_bound(make_pair(c[i].u, -1));
    if (it == b.end() || it->first > c[i].v) {
      printf("No\n");
      return 0;
    }
    kq[c[i].cs] = it->second;
    b.erase(it);
  }
  printf("Yes\n");
  for (int i = 1; i < n; ++i) printf("%d ", kq[i]);
}
