#include <bits/stdc++.h>
using namespace std;
const int maxn = 200010;
int n, m;
long long A[maxn], B[maxn];
struct Segment {
  long long L, R;
  int id;
} t[maxn];
struct bridge {
  long long len;
  int id;
} c[maxn];
int ans[maxn];
set<pair<long long, int> > S;
bool cmp(const Segment &A, const Segment &B) {
  if (A.R == B.R) return A.L > B.L;
  return A.R < B.R;
}
int main() {
  scanf("%d%d", &n, &m);
  if (m < n - 1) {
    printf("No\n");
    return 0;
  }
  for (int i = 1; i <= n; ++i) {
    scanf("%I64d%I64d", &A[i], &B[i]);
    if (i > 1) {
      t[i - 1].L = A[i] - B[i - 1], t[i - 1].R = B[i] - A[i - 1],
            t[i - 1].id = i - 1;
    }
  }
  for (int i = 1; i <= m; ++i) {
    scanf("%I64d", &c[i].len);
    c[i].id = i;
    S.insert(make_pair(c[i].len, c[i].id));
  }
  sort(t + 1, t + n, cmp);
  for (int i = 1; i < n; ++i) {
    pair<long long, int> p = *S.lower_bound(make_pair(t[i].L, -1));
    if (p.first < t[i].L) {
      printf("No\n");
      return 0;
    }
    if (p.first > t[i].R) {
      printf("No\n");
      return 0;
    } else
      ans[t[i].id] = p.second;
    S.erase(p);
  }
  printf("Yes\n");
  for (int i = 1; i < n; ++i) printf("%d ", ans[i]);
  return 0;
}
