#include <bits/stdc++.h>
using namespace std;
const bool DEBUG = false;
template <typename T>
bool readInteger(T& x) {
  char c, r = 0, n = 0;
  x = 0;
  for (;;) {
    c = getchar();
    if ((c < 0) && (!r))
      return (0);
    else if ((c == '-') && (!r))
      n = 1;
    else if ((c >= '0') && (c <= '9'))
      x = x * 10 + c - '0', r = 1;
    else if (r)
      break;
  }
  if (n) x = -x;
  return (1);
}
const int MOD = 1000000007;
const int MX = 2.1e5;
long long L[MX], R[MX];
long long lens[MX];
int ans[MX];
void fail() {
  printf("No\n");
  exit(0);
}
int main() {
  int N;
  readInteger(N);
  ;
  int M;
  readInteger(M);
  ;
  for (int i = (0); i < int(N); i++) {
    readInteger(L[i]);
    readInteger(R[i]);
  }
  for (int i = (0); i < int(M); i++) readInteger(lens[i]);
  vector<pair<pair<long long, long long>, long long> > A;
  vector<pair<long long, long long> > B;
  for (int i = (0); i < int(N - 1); i++) {
    long long lo = L[i + 1] - R[i];
    long long hi = R[i + 1] - L[i];
    A.push_back({{lo, hi}, i});
  }
  for (int i = (0); i < int(M); i++) B.push_back({lens[i], i});
  sort(A.begin(), A.end());
  sort(B.begin(), B.end());
  set<pair<long long, long long> > S;
  int idx = 0;
  for (auto& q : (B)) {
    while (idx < A.size() && A[idx].first.first <= q.first) {
      S.insert({A[idx].first.second, A[idx].second});
      ++idx;
    }
    auto it = S.lower_bound({q.first, -1});
    if (it != S.end()) {
      ans[it->second] = q.second + 1;
      S.erase(it);
    }
  }
  for (int i = (0); i < int(N - 1); i++)
    if (ans[i] == 0) fail();
  printf("Yes\n");
  for (int i = (0); i < int(N - 1); i++) printf("%d ", ans[i]);
}
