#include <bits/stdc++.h>
using namespace std;
vector<pair<pair<long long, long long>, int> > gap;
vector<pair<long long, int> > bri;
priority_queue<pair<long long, int> > q;
long long L[252521], R[252521];
int out[252521];
int main() {
  int n, m;
  long long a;
  scanf("%d %d", &n, &m);
  for (int i = 0; i < n; i++) {
    scanf("%I64d %I64d", &L[i], &R[i]);
  }
  for (int i = 0; i < n - 1; i++)
    gap.push_back(make_pair(make_pair(L[i + 1] - R[i], R[i + 1] - L[i]), i));
  for (int i = 0; i < m; i++) {
    scanf("%I64d", &a);
    bri.push_back(make_pair(a, i));
  }
  sort(gap.begin(), gap.end());
  sort(bri.begin(), bri.end());
  memset(out, -1, sizeof(out));
  int it = 0;
  for (int i = 0; i < m; i++) {
    long long len = bri[i].first;
    while (gap[it].first.first <= len && it < n - 1) {
      q.push(make_pair(-gap[it].first.second, gap[it].second));
      it++;
    }
    if (!q.empty()) {
      pair<long long, int> p = q.top();
      if (-p.first < len) {
        cout << "No" << endl;
        return 0;
      }
    }
    if (q.empty()) continue;
    pair<long long, int> p = q.top();
    q.pop();
    out[p.second] = bri[i].second;
  }
  if (!q.empty()) {
    cout << "No" << endl;
    return 0;
  }
  for (int i = 0; i < n - 1; i++) {
    if (out[i] < 0) {
      cout << "No" << endl;
      return 0;
    }
  }
  printf("Yes\n");
  for (int i = 0; i < n - 1; i++) {
    if (i < n - 2)
      printf("%d ", out[i] + 1);
    else
      printf("%d\n", out[i] + 1);
  }
}
