#include <bits/stdc++.h>
using namespace std;
int n, m;
struct node {
  long long x, y;
  int num;
} b[205000], c[205000];
struct dian {
  long long val;
  int ch;
  int num;
} a[205000];
bool cmp1(dian a, dian b) { return a.val < b.val; }
bool cmp2(node a, node b) {
  if (a.x != b.x) return a.x < b.x;
  return a.y < b.y;
}
bool cmp3(dian a, dian b) {
  if (a.ch == 0) return false;
  if (b.ch == 0) return true;
  return a.ch < b.ch;
}
int main() {
  cin >> n >> m;
  for (int i = 1; i <= n; i++) {
    cin >> c[i].x >> c[i].y;
    ;
  }
  for (int i = 1; i < n; i++) {
    b[i].x = c[i + 1].x - c[i].y;
    b[i].y = c[i + 1].y - c[i].x;
    b[i].num = i;
  }
  for (int i = 1; i <= m; i++) {
    a[i].num = i;
    cin >> a[i].val;
  }
  sort(a + 1, a + m + 1, cmp1);
  sort(b + 1, b + n, cmp2);
  int j = 1;
  multiset<pair<long long, int> > s;
  int ge = 0;
  for (int i = 1; i <= m; i++) {
    while (b[j].x <= a[i].val && j < n) {
      s.insert(make_pair(b[j].y, j));
      j++;
    }
    if (!s.empty() && (*s.begin()).first >= a[i].val) {
      a[i].ch = b[(*s.begin()).second].num;
      s.erase(s.begin());
      ge++;
    }
  }
  if (ge < n - 1) {
    puts("No");
    return 0;
  }
  puts("Yes");
  sort(a + 1, a + m + 1, cmp3);
  for (int i = 1; i < n; i++) {
    printf("%d ", a[i].num);
  }
  return 0;
}
