#include <bits/stdc++.h>
using namespace std;
const int oo = 1000000000;
const long long ool = (long long)oo * oo;
int n, m;
pair<long long, long long> pt[200005];
long long a[200005];
bool NO = false;
int out[200005];
vector<pair<pair<long long, long long>, int> > Rel;
set<pair<long long, int> > S;
int main() {
  scanf("%d%d", &n, &m);
  for (int i = (int)(0); i < (int)(n); ++i)
    scanf("%I64d%I64d", &pt[i].first, &pt[i].second);
  for (int i = (int)(0); i < (int)(m); ++i) scanf("%I64d", a + i);
  for (int i = (int)(0); i < (int)(n - 1); ++i)
    Rel.push_back(
        {{pt[i + 1].first - pt[i].second, pt[i + 1].second - pt[i].first},
         -i - 1});
  for (int i = (int)(0); i < (int)(m); ++i)
    Rel.push_back({{a[i], ool + 5}, i + 1});
  sort(Rel.begin(), Rel.end());
  for (auto first : Rel) {
    long long lo = first.first.first, hi = first.first.second;
    int id = first.second;
    if (id < 0)
      S.insert({hi, -id - 1});
    else {
      auto it = S.lower_bound({lo, -oo});
      if (it == S.end()) continue;
      out[it->second] = id;
      S.erase(it);
    }
  }
  if (S.size())
    printf("No\n");
  else {
    printf("Yes\n");
    for (int i = (int)(0); i < (int)(n - 1); ++i) printf("%d ", out[i]);
    printf("\n");
  }
  return 0;
}
