#include <bits/stdc++.h>
using namespace std;
const int inf = 0x3f3f3f3f;
const int mod = 1e9 + 7;
const int maxn = 200005;
const int maxm = 10005;
struct node {
  long long minn, maxx;
  friend bool operator<(node a, node b) { return a.maxx > b.maxx; }
  int id;
} a[maxn];
struct node2 {
  long long bi;
  int id;
} b[maxn];
int vis[maxn], ans[maxn];
long long x[maxn], y[maxn];
bool cmp(node a, node b) { return a.minn < b.minn; }
bool cmp2(node2 a, node2 b) { return a.bi < b.bi; }
int main() {
  int n, m;
  scanf("%d%d", &n, &m);
  priority_queue<node> q;
  for (int i = 0; i < n; i++) scanf("%lld%lld", &x[i], &y[i]);
  for (int i = 0; i < m; i++) {
    scanf("%lld", &b[i].bi);
    b[i].id = i;
  }
  for (int i = 1; i < n; i++) {
    a[i].id = i;
    a[i].minn = x[i] - y[i - 1];
    a[i].maxx = y[i] - x[i - 1];
  }
  int cnt = 0;
  int flag = 0;
  sort(a + 1, a + n, cmp);
  sort(b, b + m, cmp2);
  int j = 1;
  for (int i = 0; i < m; i++) {
    while (j < n && a[j].minn <= b[i].bi && b[i].bi <= a[j].maxx) {
      q.push(a[j]);
      j++;
    }
    if (q.size() == 0) continue;
    node now = q.top();
    q.pop();
    if (now.maxx < b[i].bi) {
      flag = 1;
      break;
    }
    cnt++;
    ans[now.id] = b[i].id;
  }
  if (cnt < n - 1) {
    printf("No\n");
    return 0;
  }
  if (flag == 1) {
    printf("No\n");
  } else {
    printf("Yes\n");
    for (int i = 1; i < n; i++) printf("%d ", ans[i] + 1);
    printf("\n");
  }
  return 0;
}
