#include <bits/stdc++.h>
using namespace std;
int N, M;
pair<long long, long long> P[200002];
pair<long long, int> A[200002];
pair<pair<long long, long long>, int> T[200002];
multimap<long long, int> mA;
int ans[200002];
int main(int argc, char **argv) {
  ios::sync_with_stdio(false);
  scanf("%d%d", &N, &M);
  for (int i = 0; i < N; i++) scanf("%lld%lld", &P[i].first, &P[i].second);
  for (int i = 0; i < M; i++) {
    long long a;
    scanf("%lld", &a);
    A[i].first = a;
    A[i].second = i + 1;
  }
  if (N - 1 > M) {
    printf("No\n");
    return 0;
  }
  for (int i = 0; i < N - 1; i++) {
    T[i].first.second = P[i + 1].first - P[i].second;
    T[i].first.first = P[i + 1].second - P[i].first;
    T[i].second = i;
  }
  sort(A, A + M);
  sort(T, T + N - 1);
  int ok = 1;
  int k = 0;
  for (int i = 0; i < N - 1 && ok; i++) {
    while (k < M && A[k].first <= T[i].first.first) {
      mA.insert(A[k]);
      k++;
    }
    map<long long, int>::iterator it = mA.lower_bound(T[i].first.second);
    if (it == mA.end()) {
      ok = 0;
    } else {
      ans[T[i].second] = it->second;
      mA.erase(it);
    }
  }
  if (!ok) {
    printf("No\n");
  } else {
    printf("Yes\n");
    for (int i = 0; i < N - 1; i++) printf("%d ", ans[i]);
    printf("\n");
  }
  return 0;
}
