#include <bits/stdc++.h>
using namespace std;
const long long N = 200010;
struct Node {
  long long min, max;
  long long id;
  bool operator<(const Node &A) const { return max > A.max; }
} v[N];
struct Nodeb {
  long long v;
  long long x;
} b[N];
priority_queue<Node> pq;
long long cnt, n, m, i, j, ans[N];
long long l, r, l1, r1;
bool cmp1(Node x, Node y) {
  return x.min < y.min || x.min == y.min && x.max < y.max;
}
bool cmp2(Nodeb x, Nodeb y) { return x.v < y.v; }
int main() {
  cin >> n >> m;
  if (m < n - 1) {
    printf("No\n");
    return 0;
  }
  cin >> l >> r;
  for (i = 2; i <= n; ++i) {
    cin >> l1 >> r1;
    v[i - 1].min = l1 - r;
    v[i - 1].max = r1 - l;
    l = l1;
    r = r1;
    v[i - 1].id = i - 1;
  }
  for (i = 1; i <= m; ++i) {
    cin >> b[i].v;
    b[i].x = i;
  }
  sort(v + 1, v + n, cmp1);
  sort(b + 1, b + m + 1, cmp2);
  long long p = 1;
  for (long long i = 1; i <= m; i++) {
    while (b[i].v >= v[p].min && p < n) pq.push(v[p]), p++;
    if (pq.empty()) continue;
    if (pq.top().max < b[i].v) return printf("No\n"), 0;
    Node now = pq.top();
    pq.pop();
    ans[now.id] = b[i].x;
  }
  for (long long i = 1; i < n; i++)
    if (!ans[i]) return printf("No"), 0;
  printf("Yes\n");
  for (long long i = 1; i < n; i++) printf("%lld ", ans[i]);
  return 0;
}
