#include <bits/stdc++.h>
using namespace std;
bool comp(const pair<pair<long long, long long>, long long> &a,
          const pair<pair<long long, long long>, long long> &b) {
  if (a.first.second != b.first.second)
    return a.first.second < b.first.second;
  else
    return a.first.first < b.first.first;
}
int main() {
  long long n, m, p1, p2, c1, c2;
  cin >> n >> m;
  vector<pair<pair<long long, long long>, long long> > gap(n - 1);
  cin >> p1 >> p2;
  for (long long i = 0; i < n - 1; ++i) {
    cin >> c1 >> c2;
    gap[i] = {{c1 - p2, c2 - p1}, i};
    p1 = c1, p2 = c2;
  }
  set<pair<long long, long long> >::iterator it;
  set<pair<long long, long long> > bridges;
  for (long long i = 0; i < m; ++i) {
    cin >> c1;
    bridges.insert({c1, i});
  }
  sort(gap.begin(), gap.end(), comp);
  vector<long long> ans(n);
  for (long long i = 0; i < gap.size(); ++i) {
    it = bridges.lower_bound({gap[i].first.first, -1});
    if (it != bridges.end() && it->first <= gap[i].first.second) {
      ans[gap[i].second] = it->second;
      bridges.erase(it);
    } else {
      cout << "No";
      return 0;
    }
  }
  cout << "Yes\n";
  for (long long i = 0; i < n - 1; ++i) {
    cout << ans[i] + 1 << " ";
  }
}
