#include <bits/stdc++.h>
using namespace std;
int n, m;
pair<long long, long long> in[222222];
long long a[222222];
pair<pair<long long, long long>, int> dat[222222];
set<pair<long long, int>> qiao;
int ans[2222222];
int main() {
  cin.tie();
  ios::sync_with_stdio(0);
  cin >> n >> m;
  for (int i = 1; i <= n; ++i) cin >> in[i].first >> in[i].second;
  for (int i = 1; i < n; ++i)
    dat[i].first.first = in[i + 1].second - in[i].first,
    dat[i].first.second = in[i + 1].first - in[i].second, dat[i].second = i;
  for (int i = 1; i <= m; ++i) cin >> a[i], qiao.insert(make_pair(a[i], i));
  sort(dat + 1, dat + n);
  for (int i = 1; i < n; ++i) {
    auto it = qiao.lower_bound(make_pair(dat[i].first.second, 0));
    if (it == qiao.end() || it->first > dat[i].first.first) {
      cout << "No" << endl;
      return 0;
    }
    ans[dat[i].second] = it->second;
    qiao.erase(it);
  }
  cout << "Yes" << endl;
  for (int i = 1; i < n; ++i) cout << ans[i] << ' ';
}
