#include <bits/stdc++.h>
using namespace std;
struct obj {
  long long int val;
  int type;
  int ind;
};
int n, m, res[200010];
vector<pair<long long int, long long int> > island;
vector<obj> vet;
vector<long long int> bridge;
set<pair<long long int, int> > myS;
bool cmp(const obj &a, const obj &b) {
  if (b.val != a.val) {
    return a.val < b.val;
  }
  return a.type < b.type;
}
int main() {
  cin >> n >> m;
  for (int i = 0; i < n; i++) {
    long long int a, b;
    cin >> a >> b;
    island.push_back(make_pair(a, b));
  }
  for (int i = 0; i < m; i++) {
    long long int a;
    cin >> a;
    bridge.push_back(a);
  }
  for (int i = 0; i < n - 1; i++) {
    obj aux;
    aux.ind = i;
    aux.val = island[i + 1].first - island[i].second;
    aux.type = -1;
    vet.push_back(aux);
    aux.val = island[i + 1].second - island[i].first;
    aux.type = 1;
    vet.push_back(aux);
  }
  for (int i = 0; i < m; i++) {
    obj aux;
    aux.ind = i;
    aux.val = bridge[i];
    aux.type = 0;
    vet.push_back(aux);
  }
  sort(vet.begin(), vet.end(), cmp);
  int cont = 0;
  for (int i = 0; i < vet.size(); i++) {
    obj aux = vet[i];
    if (vet[i].type == -1) {
      myS.insert(make_pair(island[aux.ind + 1].second - island[aux.ind].first,
                           aux.ind));
    } else if (vet[i].type == 1) {
      myS.erase(make_pair(island[aux.ind + 1].second - island[aux.ind].first,
                          aux.ind));
    } else if (!myS.empty()) {
      res[myS.begin()->second] = aux.ind + 1;
      myS.erase(myS.begin());
      cont++;
    }
  }
  if (cont >= n - 1) {
    cout << "Yes" << endl;
    for (int i = 0; i < n - 1; i++) {
      cout << res[i] << " \n"[i == n - 2];
    }
  } else {
    cout << "No" << endl;
  }
  return 0;
}
