#include <bits/stdc++.h>
const int N = 200002;
using namespace std;
set<pair<long long int, long long int> > s;
set<pair<long long int, long long int> >::iterator it;
long long int n, m, i, j, h, x, l[N], r[N], ans[N];
pair<pair<long long int, long long int>, long long int> p[N];
int main() {
  cin >> n >> m;
  for (i = 1; i <= n; i++) {
    cin >> l[i] >> r[i];
    if (i > 1)
      p[i - 1] = make_pair(make_pair(r[i] - l[i - 1], l[i] - r[i - 1]), i - 1);
  }
  for (i = 1; i <= m; i++) {
    cin >> x;
    s.insert(make_pair(x, i));
  }
  if (m < n - 1) {
    cout << "No" << endl;
    return 0;
  }
  sort(p + 1, p + n);
  for (i = 1; i < n; i++) {
    it = s.lower_bound(make_pair(p[i].first.second, 0));
    if (it == s.end() || it->first > p[i].first.first) {
      cout << "No" << endl;
      return 0;
    }
    ans[p[i].second] = it->second;
    s.erase(it);
  }
  cout << "Yes" << endl;
  for (i = 1; i < n; i++) cout << ans[i] << " ";
}
