#include <bits/stdc++.h>
using namespace std;
int64_t gcd(int64_t x, int64_t y) {
  assert(x >= 0 && y >= 0 && (x != 0 || y != 0));
  if (y == 0) return x;
  return gcd(y, x % y);
}
class MyHash : public std::unary_function<tuple<int64_t, int64_t>, size_t> {
 public:
  size_t operator()(const tuple<int64_t, int64_t> &tp) const {
    int64_t ret = get<0>(tp) * 1000 + get<1>(tp) + 200;
    return ret;
  }
};
class MyEq : public std::unary_function<tuple<int64_t, int64_t>, bool> {
 public:
  bool operator()(const tuple<int64_t, int64_t> &left,
                  const tuple<int64_t, int64_t> &right) const {
    return get<0>(left) == get<0>(right) && get<1>(left) == get<1>(right);
  }
};
typedef struct Event {
  int obj;
  int64_t time;
  int type;
} Event;
typedef struct Hnode {
  int obj;
  int64_t etime;
} Hnode;
void shiftup(int i, Hnode hp[]) {
  while (i > 0) {
    int j = (i - 1) / 2;
    if (hp[j].etime <= hp[i].etime) return;
    swap(hp[i], hp[j]);
    i = j;
  }
}
void shiftdown(Hnode hp[], int n, int i) {
  while (1) {
    int j = i * 2 + 1;
    if (j >= n) return;
    if (j + 1 < n && hp[j + 1].etime < hp[j].etime) ++j;
    if (hp[i].etime <= hp[j].etime) return;
    swap(hp[i], hp[j]);
    i = j;
  }
}
bool cmp(Event e0, Event e1) {
  if (e0.time < e1.time) return true;
  if (e0.time > e1.time) return false;
  return e0.type < e1.type;
}
int64_t l[200000], r[200000];
Event e[600000];
int64_t vl[200000], vr[200000];
int ass[200000] = {};
Hnode hp[200000];
int main() {
  int n, m;
  int i, rdx, rdy;
  cin >> n >> m;
  for (i = 0; i < n; i++) cin >> l[i] >> r[i];
  int64_t bi;
  int en = 0;
  for (i = 0; i < m; i++) {
    cin >> bi;
    e[en++] = {i, bi, 1};
  }
  for (i = 1; i < n; i++) {
    vl[i - 1] = l[i] - r[i - 1];
    vr[i - 1] = r[i] - l[i - 1];
    e[en++] = {i - 1, vl[i - 1], 0};
    e[en++] = {i - 1, vr[i - 1], 2};
  }
  assert(en == m + n * 2 - 2);
  sort(e, e + en, cmp);
  int hn = 0;
  for (i = 0; i < en; i++) {
    if (e[i].type == 0) {
      int obj = e[i].obj;
      hp[hn++] = {obj, vr[obj]};
      shiftup(hn - 1, hp);
    } else if (e[i].type == 2) {
      int obj = e[i].obj;
      if (ass[obj] == 0) {
        cout << "No" << endl;
        return 0;
      }
    } else if (e[i].type == 1) {
      int obj = e[i].obj;
      if (hn == 0) continue;
      int ass_target = hp[0].obj;
      ass[ass_target] = obj + 1;
      swap(hp[0], hp[hn - 1]);
      --hn;
      shiftdown(hp, hn, 0);
    } else {
      assert(0);
    }
  }
  cout << "Yes" << endl;
  for (i = 0; i < n - 1; i++) {
    cout << ass[i];
    if (i == n - 2)
      cout << endl;
    else
      cout << ' ';
  }
  return 0;
}
