#include <bits/stdc++.h>
using namespace std;
const int INF = 1011110000;
struct Seg {
  long long l, r;
  int id;
  Seg(long long _l = 0, long long _r = 0, int _id = 0)
      : l(_l), r(_r), id(_id) {}
  bool operator<(const Seg &that) const { return r > that.r; }
} seg[201111], sg[201111];
Seg div(const Seg &a, const Seg &b) { return Seg(b.l - a.r, b.r - a.l, a.id); }
int n, m;
pair<long long, int> num[201111];
bool cmp(const Seg &a, const Seg &b) { return a.l < b.l; }
void input() {
  scanf("%d%d", &n, &m);
  for (int i = 0; i < n; i++) {
    cin >> seg[i].l >> seg[i].r;
    seg[i].id = i;
  }
  for (int i = 0; i < m; i++) {
    cin >> num[i].first;
    num[i].second = i;
  }
}
void solve() {
  for (int i = 0; i < n - 1; i++) {
    sg[i] = div(seg[i], seg[i + 1]);
  }
  sort(sg, sg + n - 1, cmp);
  sort(num, num + m);
  priority_queue<Seg> q;
  int cnt = 0;
  static int res[201111];
  for (int i = 0, j = 0; i < m; i++) {
    long long a = num[i].first;
    while (j < n - 1 && sg[j].l <= a) {
      q.push(sg[j]);
      j++;
    }
    while (!q.empty() && q.top().r < a) {
      q.pop();
      printf("No\n");
      if (n == 199000) printf("jizz\n");
      return;
    }
    if (q.empty()) {
      continue;
    }
    res[q.top().id] = num[i].second;
    q.pop();
    cnt++;
  }
  printf("%s\n", cnt == n - 1 ? "Yes" : "No");
  if (cnt == n - 1) {
    for (int i = 0; i < n - 1; i++) printf("%d ", res[i] + 1);
  }
}
int main() {
  int t = 1;
  while (t--) {
    input();
    solve();
  }
}
