#include <bits/stdc++.h>
using namespace std;
int N, M;
signed long long L[202020], R[202020], MA[202020], MI[202020];
vector<signed long long> A;
int id[202020];
map<signed long long, vector<int> > EV;
void solve() {
  int i, j, k, l, r, x, y;
  string s;
  cin >> N >> M;
  for (i = 0; i < N; i++) cin >> L[i] >> R[i];
  for (i = 0; i < M; i++) {
    signed long long LL;
    cin >> LL;
    A.push_back(LL);
    EV[A[i]].push_back(i + 1000000);
  }
  for (i = 0; i < N - 1; i++) {
    MI[i] = L[i + 1] - R[i];
    MA[i] = R[i + 1] - L[i];
    EV[MI[i]].push_back(i);
  }
  set<pair<signed long long, int> > S;
  for (auto& r : EV) {
    vector<int> VV = r.second;
    sort((VV.begin()), (VV.end()));
    for (auto& ev : VV) {
      if (ev < 1000000) {
        S.insert({MA[ev], ev});
      } else if (ev < 2000000) {
        ev -= 1000000;
        auto s = S.begin();
        if (s == S.end()) continue;
        x = s->second;
        if (A[ev] > MA[x]) return (void)printf("No\n");
        id[x] = ev + 1;
        S.erase(s);
      }
    }
  }
  if (S.size()) return (void)printf("No\n");
  (void)printf("Yes\n");
  for (i = 0; i < N - 1; i++) (void)printf("%d ", id[i]);
  (void)printf("\n");
}
int main(int argc, char** argv) {
  string s;
  int i;
  if (argc == 1) ios::sync_with_stdio(false);
  for (i = 0; i < argc - 1; i++) s += argv[i + 1], s += '\n';
  for (i = 0; i < s.size(); i++) ungetc(s[s.size() - 1 - i], stdin);
  solve();
  return 0;
}
