#include <bits/stdc++.h>
using namespace std;
template <typename T, typename U>
void _max(T &a, U b) {
  if (a < b) a = b;
}
template <typename T, typename U>
void _min(T &a, U b) {
  if (a > b) a = b;
}
const int N = 200005;
struct data {
  long long x, y;
  int idx;
};
struct data1 {
  long long x, p;
  friend bool operator<(data1 n1, data1 n2) { return n1.x > n2.x; }
} P;
bool cmpr(const data &a, const data &b) { return a.x < b.x; }
data p[N];
pair<long long, int> a[N];
int ans[N];
priority_queue<data1> q;
int main() {
  long long n, m, i, j, flag = true;
  cin >> n >> m;
  scanf("%lld%lld", &p[0].x, &p[0].y);
  for (i = 1; i < n; i++) {
    scanf("%lld%lld", &p[i].x, &p[i].y);
    j = p[i].y - p[i - 1].x;
    p[i - 1].x = p[i].x - p[i - 1].y;
    p[i - 1].y = j;
    p[i - 1].idx = i - 1;
  }
  for (i = 0; i < m; i++) scanf("%lld", &a[i].first), a[i].second = i + 1;
  sort(a, a + m);
  sort(p, p + n - 1, cmpr);
  for (i = 0, j = 0; i < m; i++) {
    while (j < n - 1 && p[j].x <= a[i].first) {
      P.x = p[j].y;
      P.p = p[j].idx;
      q.push(P);
      j++;
    }
    if (!q.empty()) {
      P = q.top();
      q.pop();
      if (P.x < a[i].first) flag = false;
      ans[P.p] = a[i].second;
    }
  }
  for (i = 0; i < n - 1; i++)
    if (!ans[i]) flag = false;
  if (flag) {
    printf("Yes\n");
    for (i = 0; i < n - 1; i++) printf("%d ", ans[i]);
    printf("\n");
  } else
    printf("No\n");
  return 0;
}
