#include <bits/stdc++.h>
using namespace std;
long long n, m, lastR = -1, lastL = -1, sol[200110];
typedef struct bridge {
  long long minim, maxim;
  int island;
};
typedef struct bridges {
  long long len;
  int pos;
};
bool operator<(const bridge& a, const bridge& b) {
  if (a.maxim != b.maxim) return a.maxim < b.maxim;
  return a.minim < b.minim;
}
bool operator<(const bridges& a, const bridges& b) {
  if (a.len != b.len) return a.len < b.len;
  return a.pos < b.pos;
}
bridge a[200110];
set<bridges> s;
int main() {
  cin >> n >> m;
  long long l, r;
  cin >> lastL >> lastR;
  for (int i = 0; i < n - 1; i++) {
    cin >> l >> r;
    a[i].island = i;
    a[i].maxim = r - lastL;
    a[i].minim = l - lastR;
    lastL = l, lastR = r;
  }
  std::sort(a, a + n - 1);
  for (int i = 1; i <= m; i++) {
    bridges b;
    cin >> b.len;
    b.pos = i;
    s.insert(b);
  }
  for (int i = 0; i < n - 1; i++) {
    bridges br;
    br.len = a[i].minim;
    br.pos = 0;
    auto bx = s.lower_bound(br);
    if (bx != s.end() && bx->len <= a[i].maxim) {
      sol[a[i].island] = bx->pos;
      s.erase(bx);
    } else
      break;
  }
  for (int i = 0; i < n - 1; i++)
    if (sol[i] == 0) {
      cout << "No\n";
      return 0;
    }
  cout << "Yes\n";
  for (int i = 0; i < n - 1; i++) printf("%d ", sol[i]);
  return 0;
}
