#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int n, m;
  cin >> n >> m;
  vector<pair<long long, long long> > br(n);
  for (int i = 0; i < n; ++i) cin >> br[i].first >> br[i].second;
  vector<pair<long long, int> > a(m);
  for (int i = 0; i < m; ++i) {
    cin >> a[i].first;
    a[i].second = i;
  }
  sort(a.begin(), a.end());
  vector<pair<pair<long long, long long>, int> > pos(n - 1);
  for (int i = 1; i < n; ++i)
    pos[i - 1] = make_pair(make_pair(br[i].first - br[i - 1].second,
                                     br[i].second - br[i - 1].first),
                           i - 1);
  vector<int> b(n - 1);
  priority_queue<pair<long long, int> > q;
  sort(pos.begin(), pos.end());
  int fna = 0;
  for (int i = 0; i < m; ++i) {
    while (fna < n - 1 && pos[fna].first.first <= a[i].first) {
      q.push(make_pair(-pos[fna].first.second, pos[fna].second));
      ++fna;
    }
    if (!q.empty()) {
      pair<long long, int> w = q.top();
      q.pop();
      w.first *= -1;
      if (w.first < a[i].first) {
        cout << "No" << endl;
        return 0;
      }
      b[w.second] = a[i].second;
    }
  }
  if (!q.empty() || fna != n - 1) {
    cout << "No" << endl;
    return 0;
  }
  cout << "Yes" << endl;
  for (int i = 0; i < n - 1; ++i) cout << b[i] + 1 << " ";
  cout << endl;
}
