#include <bits/stdc++.h>
using namespace std;
const int MAX_N = 2e5 + 3;
int N, M;
pair<pair<long long, long long>, int> line[MAX_N];
set<pair<long long, int>> brid;
int ans[MAX_N];
int main() {
  long long lf, rf, l, r;
  scanf("%d%d%lld%lld", &N, &M, &lf, &rf);
  for (int i = 1; i < N; ++i, lf = l, rf = r) {
    scanf("%lld%lld", &l, &r);
    line[i] = {{r - lf, l - rf}, i};
  }
  for (int i = 1; i <= M; ++i) {
    long long tmp;
    scanf("%lld", &tmp);
    brid.insert({tmp, i});
  }
  sort(line + 1, line + N);
  for (int i = 1; i <= N - 1; ++i) {
    auto iti = brid.lower_bound({line[i].first.second, 1});
    if (iti == brid.end() || iti->first > line[i].first.first)
      return printf("No\n"), 0;
    ans[line[i].second] = iti->second;
    brid.erase(iti);
  }
  printf("Yes\n");
  for (int i = 1; i <= N - 1; ++i) printf("%d ", ans[i]);
  return 0;
}
