#include <bits/stdc++.h>
using namespace std;
const long long MAXN = 200000 + 10;
struct seg {
  long long l, r;
  int id;
  bool operator<(const seg& rhs) const {
    if (r == rhs.r) return l < rhs.l;
    return r < rhs.r;
  }
} B[MAXN];
int N, M;
long long ans[MAXN];
set<pair<long long, long long> > A;
int main() {
  scanf("%d%d", &N, &M);
  long long l, r, l1, r1;
  scanf("%lld%lld", &l1, &r1);
  int n = 0;
  for (long long i = 1; i < N; i++) {
    scanf("%lld%lld", &l, &r);
    B[n].id = i - 1;
    B[n].l = l - r1;
    B[n++].r = r - l1;
    l1 = l;
    r1 = r;
  }
  sort(B, B + n);
  long long x;
  for (long long i = 1; i <= M; i++) {
    scanf("%lld", &x);
    A.insert(make_pair(x, i));
  }
  int flag = 1;
  for (int i = 0; i < n; i++) {
    long long L = B[i].l, R = B[i].r;
    set<pair<long long, long long> >::iterator it;
    it = A.lower_bound(make_pair(L, 0));
    if (it == A.end() || (it->first) > R) {
      flag = 0;
      break;
    }
    ans[B[i].id] = it->second;
    A.erase(it);
  }
  if (flag) {
    cout << "Yes" << endl;
    for (long long j = 0; j < n; j++) cout << ans[j] << ' ';
    cout << endl;
  } else
    cout << "No" << endl;
  return 0;
}
