#include <bits/stdc++.h>
using namespace std;
const char *fail = "No";
const char *succ = "Yes";
const int maxn = 2e5;
typedef struct Sg {
  long long L, R, minL;
  long long ans;
  Sg() { ans = -1; }
};
typedef struct Sg2 {
  long long val;
  int id, flag;
  Sg2(long long val, int id, int flag) {
    this->val = val, this->id = id, this->flag = flag;
  }
  friend bool operator<(const Sg2 &x, const Sg2 &y) { return x.val > y.val; }
};
typedef struct adsa {
  long long val;
  int id;
  friend bool operator<(const adsa &x, const adsa &y) { return x.val > y.val; }
};
int n, m;
adsa bridge[maxn];
Sg p[maxn];
vector<Sg2> sb;
void sest(int id1, int id2, long long val, long long &ans1, long long &ans2) {
  long long Rx = p[id2].R;
  long long Lx = p[id1].L;
  long long vs = Rx - val;
  if (vs > p[id1].R) {
    long long dis = vs - p[id1].R;
    Rx -= dis;
    Lx = p[id1].L;
  }
  ans1 = Lx;
  ans2 = Rx;
}
int main(int argc, char *argv[]) {
  scanf("%d%d", &n, &m);
  if (m < n - 1) {
    printf("%s\n", fail);
    return 0;
  }
  for (int i = 0; i < n; ++i) {
    long long l, r;
    scanf("%I64d%I64d", &l, &r);
    p[i].L = l, p[i].R = r;
  }
  for (int i = 0; i < m; ++i) {
    long long tmp;
    scanf("%I64d", &tmp);
    bridge[i].val = tmp;
    bridge[i].id = i + 1;
  }
  sort(bridge, bridge + m);
  for (int i = 0; i < n - 1; ++i) {
    long long XC, XV;
    XC = p[i + 1].L - p[i].R;
    XV = p[i + 1].R - p[i].L;
    p[i].minL = XC;
    sb.push_back(Sg2(XV, i, 1));
  }
  sort(sb.begin(), sb.end());
  int ptr = 0;
  int size = sb.size();
  for (int i = 0; i < size; ++i) {
    if (sb[i].flag == 0 && p[i].ans != -1) continue;
    while (ptr < m && bridge[ptr].val > sb[i].val) ptr++;
    if (ptr == m || p[sb[i].id].minL > bridge[ptr].val) {
      printf("%s\n", fail);
      return 0;
    }
    p[sb[i].id].ans = bridge[ptr++].id;
  }
  cout << succ << endl;
  for (int i = 0; i < n - 1; ++i) {
    if (i != 0) printf(" ");
    printf("%d", p[i].ans);
  }
  printf("\n");
  return 0;
}
