#include <bits/stdc++.h>
using namespace std;
const int MAXN = 3e5 + 100, INF = 1e9;
long long l[MAXN], r[MAXN], ans[MAXN], a;
vector<pair<long long, pair<long long, long long> > > e;
set<pair<long long, long long> > q;
int main() {
  int n, m;
  cin >> n >> m;
  for (int i = 0; i < n; ++i) {
    cin >> l[i] >> r[i];
    if (i) {
      e.push_back(make_pair(l[i] - r[i - 1], make_pair(-1, i - 1)));
      e.push_back(make_pair(r[i] - l[i - 1], make_pair(1, i - 1)));
    }
  }
  for (int i = 0; i < m; ++i) {
    cin >> a;
    e.push_back(make_pair(a, make_pair(0, i + 1)));
  }
  sort(e.begin(), e.end());
  for (int i = 0; i < e.size(); ++i) {
    pair<long long, pair<long long, long long> > vv = e[i];
    long long point = vv.second.second;
    if (vv.second.first == -1) {
      q.insert(make_pair(r[point + 1] - l[point], point));
    } else if (vv.second.first == 1) {
      q.erase(make_pair(r[point + 1] - l[point], point));
    } else if (!q.empty()) {
      pair<long long, long long> tt = *q.begin();
      long long j = tt.second;
      ans[j] = point;
      q.erase(q.begin());
    }
  }
  for (int i = 0; i < n - 1; ++i) {
    if (!ans[i]) {
      cout << "No" << endl;
      return 0;
    }
  }
  cout << "Yes" << endl;
  for (int i = 0; i < n - 1; ++i) {
    cout << ans[i] << ' ';
  }
  cout << endl;
  return 0;
}
