#include <bits/stdc++.h>
using namespace std;
int n, m;
struct tri {
  long long first, second, id;
  bool operator<(tri X) const { return first < X.first; }
};
tri tab[200005];
tri most[200005];
int ans[200005];
int main() {
  ios_base::sync_with_stdio(0);
  cin >> n >> m;
  for (int i = 0; i < n; i++) {
    cin >> tab[i].first >> tab[i].second;
    tab[i].id = i + 1;
  }
  for (int i = 0; i < n - 1; i++) {
    long long tmp = tab[i].first;
    tab[i].first = tab[i + 1].first - tab[i].second;
    tab[i].second = tab[i + 1].second - tmp;
  }
  for (int i = 0; i < m; i++) {
    cin >> most[i].first;
    most[i].id = i + 1;
  }
  sort(tab, tab + n - 1);
  sort(most, most + m);
  set<pair<long long, int> > S;
  bool git = true;
  int idx = 0;
  for (int i = 0; i < m; i++) {
    while (idx < n - 1 && tab[idx].first <= most[i].first) {
      S.insert(make_pair(tab[idx].second, tab[idx].id));
      idx++;
    }
    if (S.size() == 0) {
      continue;
    }
    pair<long long, int> tmp = *S.begin();
    if (most[i].first > tmp.first) continue;
    ans[tmp.second] = most[i].id;
    S.erase(S.begin());
  }
  for (int i = 1; i < n; i++) {
    if (ans[i] == 0) git = false;
  }
  if (!git)
    cout << "No" << endl;
  else {
    cout << "Yes" << endl;
    for (int i = 1; i < n; i++) cout << ans[i] << " ";
    cout << endl;
  }
}
