#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, m, i;
  cin >> n >> m;
  long long l[n + 10];
  long long r[n + 10];
  for (i = 0; i < n; i++) {
    cin >> l[i] >> r[i];
  }
  vector<pair<pair<long long, long long>, long long> > dif;
  for (i = 0; i < n - 1; i++) {
    dif.push_back(make_pair(make_pair(r[i + 1] - l[i], l[i + 1] - r[i]), i));
  }
  set<pair<long long, long long> > bridge;
  for (i = 0; i < m; i++) {
    long long x;
    cin >> x;
    bridge.insert(make_pair(x, i + 1));
  }
  vector<int> ans(n);
  if (m < n - 1) {
    cout << "No" << endl;
    return 0;
  }
  sort(dif.begin(), dif.end());
  for (auto p : dif) {
    long long lx = p.first.first, ly = p.first.second, lz = p.second;
    auto it = bridge.lower_bound(make_pair(ly, -1));
    if (it == bridge.end() || it->first > lx) {
      cout << "No" << endl;
      return 0;
    }
    ans[lz] = it->second;
    bridge.erase(it);
  }
  cout << "Yes" << endl;
  for (i = 0; i < n - 1; i++) cout << ans[i] << " ";
}
