#include <bits/stdc++.h>
using namespace std;
int N, M;
long long L[200002], R[200002];
int posB[200002], posE[200002], pos[200002];
int wh[200002];
set<pair<long long, int> > S;
long long A[200002];
inline bool compare(const int& i1, const int& i2) { return A[i1] < A[i2]; }
inline bool compB(const int& i1, const int& i2) { return L[i1] < L[i2]; }
inline bool compE(const int& i1, const int& i2) { return R[i1] < R[i2]; }
int main() {
  cin.sync_with_stdio(false);
  cin >> N >> M;
  for (int i = 1; i <= N; ++i) cin >> L[i] >> R[i];
  for (int i = 1; i <= M; ++i) {
    cin >> A[i];
    pos[i] = i;
  }
  sort(pos + 1, pos + M + 1, compare);
  for (int i = 1; i <= N - 1; ++i) {
    long long l = L[i + 1] - R[i], r = R[i + 1] - L[i];
    L[i] = l;
    R[i] = r;
    posB[i] = i;
    posE[i] = i;
  }
  --N;
  sort(posB + 1, posB + N + 1, compB);
  sort(posE + 1, posE + N + 1, compE);
  int total = 0, pB = 1, pE = 1;
  for (int i = 1; i <= M; ++i) {
    while (pB <= N && L[posB[pB]] <= A[pos[i]]) {
      S.insert(make_pair(R[posB[pB]], posB[pB]));
      ++pB;
    }
    while (pE <= N && R[posE[pE]] < A[pos[i]]) {
      S.erase(make_pair(R[posE[pE]], posE[pE]));
      ++pE;
    }
    if (!S.empty()) {
      auto it = S.begin();
      wh[it->second] = pos[i];
      ++total;
      S.erase(it);
    }
  }
  if (total == N) {
    cout << "Yes\n";
    for (int i = 1; i <= N; ++i) cout << wh[i] << ' ';
    cout << '\n';
  } else
    cout << "No\n";
}
