#include <bits/stdc++.h>
using namespace std;
set<pair<pair<long long, long long>, int> > links;
multiset<pair<long long, int> > bridges;
int v[200007];
int main(int argc, char** argv) {
  int n, m;
  fscanf(stdin, "%d%d", &n, &m);
  long long lastL, lastR;
  for (int i = 0; i < n; i++) {
    long long l, r;
    std::cin >> l >> r;
    pair<long long, long long> link;
    if (i > 0) {
      link.second = l - lastR;
      link.first = r - lastL;
      links.insert(make_pair(link, i));
    }
    lastL = l;
    lastR = r;
  }
  for (int i = 1; i <= m; i++) {
    long long l;
    std::cin >> l;
    bridges.insert(make_pair(l, i));
  }
  bool found = true;
  for (set<pair<pair<long long, long long>, int> >::iterator it = links.begin();
       it != links.end(); ++it) {
    multiset<pair<long long, int> >::iterator br =
        bridges.lower_bound(make_pair(it->first.second, 0));
    if (br == bridges.end() || br->first > it->first.first) {
      cout << "No" << endl;
      return 0;
    }
    v[it->second] = br->second;
    bridges.erase(br);
  }
  cout << "Yes" << endl;
  for (int i = 1; i < n; i++) {
    if (i > 1) {
      cout << " ";
    }
    cout << v[i];
  }
  cout << endl;
}
