#include <bits/stdc++.h>
using namespace std;
set<pair<long long, int>> bridges;
pair<pair<long long, long long>, int> island[200200];
int out[200200];
bool compara(const pair<pair<long long, long long>, int>& i,
             const pair<pair<long long, long long>, int>& j) {
  return i.first.second < j.first.second;
}
int main() {
  int n, m;
  cin >> n >> m;
  long long int l, r, auxL, auxR;
  cin >> l >> r;
  for (int i = 0; i < n - 1; i++) {
    cin >> auxL >> auxR;
    island[i].first.first = auxL - r;
    island[i].first.second = auxR - l;
    island[i].second = i;
    l = auxL;
    r = auxR;
  }
  for (int i = 0; i < m; i++) {
    long long int aux;
    cin >> aux;
    bridges.emplace(aux, i);
  }
  sort(island, island + n - 1, compara);
  for (int i = 0; i < n - 1; i++) {
    auto it = bridges.lower_bound(make_pair(island[i].first.first, -1));
    if (it != bridges.end() && it->first <= island[i].first.second) {
      out[island[i].second] = it->second;
      bridges.erase(it);
    } else {
      cout << "No" << endl;
      return 0;
    }
  }
  cout << "Yes" << endl;
  for (int i = 0; i < n - 1; i++) {
    cout << out[i] + 1 << " ";
  }
}
