#include <bits/stdc++.h>
using namespace std;
const int kN = 2e5 + 10;
int N, M;
long long L[kN], R[kN];
struct Event {
  long long x;
  long long l, r;
  int type, id;
  bool operator<(const Event& e) const {
    if (x != e.x)
      return x < e.x;
    else
      return type > e.type;
  }
} es[2 * kN];
int e_cnt;
int ans[kN];
int main() {
  scanf("%d %d", &N, &M);
  for (int i = 1; i <= N; i++) {
    scanf("%I64d %I64d", L + i, R + i);
  }
  for (int i = 1; i < N; i++) {
    long long l = L[i + 1] - R[i];
    long long r = R[i + 1] - L[i];
    es[++e_cnt] = (Event){l, l, r, 1, i};
  }
  for (int i = 1; i <= M; i++) {
    long long x;
    scanf("%I64d", &x);
    es[++e_cnt] = (Event){x, x, x, 0, i};
  }
  sort(es + 1, es + 1 + e_cnt);
  priority_queue<Event> q;
  for (int i = 1; i <= e_cnt; i++) {
    Event& e = es[i];
    if (e.type == 1) {
      e.x = -e.r;
      q.push(e);
    } else if (q.size()) {
      Event bri = q.top();
      q.pop();
      if (e.x <= bri.r) {
        ans[bri.id] = e.id;
      } else {
        break;
      }
    }
  }
  bool ok = true;
  for (int i = 1; i < N; i++)
    if (!ans[i]) {
      printf("No\n");
      return 0;
    }
  printf("Yes\n");
  for (int i = 1; i < N; i++) printf("%d ", ans[i]);
  return 0;
}
