#include <bits/stdc++.h>
using namespace std;
int N, M;
long long L[200005], R[200005], A[200005], B[200005];
long long P[200005], Q[200005];
int X[200005], Y[200005];
int ans[200005];
int main() {
  scanf("%d%d", &N, &M);
  for (int i = 1; i <= N; i++) {
    scanf("%lld%lld", L + i, R + i);
  }
  for (int i = 1; i <= M; i++) scanf("%lld", A + i);
  for (int i = 1; i < N; i++) {
    P[i] = L[i + 1] - R[i], Q[i] = R[i + 1] - L[i];
  }
  for (int i = 1; i < N; i++) X[i] = i;
  sort(X + 1, X + N, [](const int &a, const int &b) { return P[a] < P[b]; });
  for (int i = 1; i <= M; i++) Y[i] = i;
  sort(Y + 1, Y + M + 1,
       [](const int &a, const int &b) { return A[a] < A[b]; });
  bool finish = 0;
  priority_queue<pair<long long, int> > que;
  for (int i = 1, j = 1; i <= M; i++) {
    int y = Y[i];
    while (j < N && P[X[j]] <= A[y]) {
      int x = X[j];
      que.push(make_pair(-Q[x], x));
      j++;
    }
    if (j == N) finish = 1;
    if (!que.empty() && -que.top().first < A[y]) {
      puts("No");
      return 0;
    }
    if (que.empty()) continue;
    auto top = que.top();
    que.pop();
    ans[top.second] = y;
  }
  if (!que.empty() || !finish) {
    puts("No");
    return 0;
  }
  puts("Yes");
  for (int i = 1; i < N; i++) printf("%d ", ans[i]);
  puts("");
}
