#include <bits/stdc++.h>
using namespace std;
pair<long long, long long> x[200005];
set<pair<long long, long long> > bridge;
pair<int, pair<long long, long long> > a[200005];
int ans[200005];
bool mycomp(pair<int, pair<long long, long long> > A,
            pair<int, pair<long long, long long> > B) {
  if (A.second.second != B.second.second)
    return A.second.second < B.second.second;
  return A.second.first < A.second.first;
}
int main() {
  std::ios_base::sync_with_stdio(false);
  int n, m;
  cin >> n >> m;
  for (int i = (0); i < (n); ++i) cin >> x[i].first >> x[i].second;
  for (int i = (0); i < (n - 1); ++i) {
    a[i].second.first = x[i + 1].first - x[i].second;
    a[i].second.second = x[i + 1].second - x[i].first;
    a[i].first = i;
  }
  sort(a, a + n - 1, mycomp);
  for (int i = (0); i < (m); ++i) {
    pair<long long, long long> k;
    cin >> k.first;
    k.second = i + 1;
    bridge.insert(k);
  }
  int i = 0;
  while (i < n - 1) {
    if (bridge.size() == 0) break;
    auto it = bridge.lower_bound(make_pair(a[i].second.first, -1));
    if (it != bridge.end() and (*it).first <= a[i].second.second) {
      ans[a[i].first] = (*it).second;
      bridge.erase(it);
      ++i;
    } else
      break;
  }
  if (i == n - 1) {
    cout << "Yes\n";
    for (int i = (0); i < (n - 1); ++i) cout << ans[i] << " ";
    cout << '\n';
  } else
    cout << "No\n";
  return 0;
}
