#include <bits/stdc++.h>
using namespace std;
const int N = 200005;
long long LL[N], RR[N];
int n, m, ans[N];
struct isl {
  long long l, r;
  int i;
  bool operator<(const isl &o) const { return l < o.l; }
} a[N];
struct bri {
  long long x;
  int i;
  bool operator<(const bri &o) const { return x < o.x; }
} b[N];
priority_queue<pair<long long, int> > q;
int main() {
  cin >> n >> m;
  for (int i = 1; i <= n; ++i) scanf("%lld%lld", &LL[i], &RR[i]);
  for (int i = 1; i < n; ++i)
    a[i].l = LL[i + 1] - RR[i], a[i].r = RR[i + 1] - LL[i], a[i].i = i;
  for (int i = 1; i <= m; ++i) scanf("%lld", &b[i].x), b[i].i = i;
  --n, sort(a + 1, a + 1 + n), sort(b + 1, b + 1 + m);
  memset(ans, -1, sizeof ans);
  pair<long long, int> P;
  long long l;
  for (int i = 1, j = 1; i <= m; ++i) {
    l = b[i].x;
    for (; j <= n; ++j)
      if (a[j].l > l)
        break;
      else
        q.push(make_pair(-a[j].r, -a[j].i));
    if (q.empty()) {
      if (j > n) break;
      continue;
    }
    P = q.top(), q.pop(), P.first = -P.first, P.second = -P.second;
    if (l > P.first)
      return puts("No"), 0;
    else
      ans[P.second] = b[i].i;
  }
  if (!q.empty())
    puts("No");
  else {
    for (int i = 1; i <= n; ++i)
      if (ans[i] == -1) return puts("No"), 0;
    puts("Yes");
    for (int i = 1; i <= n; ++i) printf("%d ", ans[i]);
  }
  return 0;
}
