#include <bits/stdc++.h>
using namespace std;
long long n, m;
std::vector<pair<pair<long long, long long>, long long> > dis;
std::vector<pair<long long, long long> > bridge;
long long l[200100], r[200100];
long long t;
long long ans[200100];
bool cmp(pair<pair<long long, long long>, long long> A,
         pair<pair<long long, long long>, long long> B) {
  if (A.first.second != B.first.second) return A.first.second < B.first.second;
  if (A.first.first != B.first.first) return A.first.first < B.first.first;
  return A.second < B.second;
}
int main() {
  cin >> n >> m;
  for (long long i = 0; i < n; i++) cin >> l[i] >> r[i];
  for (long long i = 0; i < m; i++) {
    cin >> t;
    bridge.push_back(make_pair(t, i));
  }
  for (long long i = 0; i < n - 1; i++) {
    dis.push_back(make_pair(make_pair(l[i + 1] - r[i], r[i + 1] - l[i]), i));
  }
  sort(dis.begin(), dis.end(), cmp);
  sort(bridge.begin(), bridge.end());
  set<pair<long long, long long> > s;
  long long idx = 0;
  for (long long i = 0; i <= n - 2; i++) {
    pair<pair<long long, long long>, long long> q = dis[i];
    while (idx < m && q.first.second >= bridge[idx].first) {
      s.insert(bridge[idx]);
      idx++;
    }
    set<pair<long long, long long> >::iterator it =
        s.lower_bound(pair<long long, long long>(dis[i].first.first, -10LL));
    if (it == s.end()) {
      cout << "No" << endl;
      return 0;
    }
    ans[dis[i].second] = (*it).second;
    s.erase(it);
  }
  cout << "Yes" << endl;
  for (long long i = 0; i < n - 1; i++) cout << ans[i] + 1 << " ";
  cout << endl;
  return 0;
}
