#include <bits/stdc++.h>
using namespace std;
class comp {
 public:
  bool operator()(pair<pair<long long, long long>, int> a,
                  pair<pair<long long, long long>, int> b) {
    return a.first.second > b.first.second;
  }
};
int main() {
  int n, m;
  scanf("%d", &n);
  scanf("%d", &m);
  vector<long long> l(n, 0), r(n, 0);
  vector<pair<pair<long long, long long>, int> > vec;
  for (int i = 0; i < n; i++) {
    scanf("%I64d", &l[i]);
    scanf("%I64d", &r[i]);
  }
  for (int i = 0; i < n - 1; i++) {
    pair<pair<long long, long long>, int> p;
    p.first.first = abs(r[i] - l[i + 1]);
    p.first.second = abs(r[i + 1] - l[i]);
    p.second = i;
    vec.push_back(p);
  }
  sort(vec.begin(), vec.end());
  vector<pair<long long, int> > ar(m);
  for (int i = 0; i < m; i++) {
    scanf("%I64d", &ar[i].first);
    ar[i].second = i + 1;
  }
  sort(ar.begin(), ar.end());
  priority_queue<pair<pair<long long, long long>, int>,
                 vector<pair<pair<long long, long long>, int> >, comp>
      pq;
  int p1 = 0, p2 = 0;
  int matched = 0;
  vector<int> myhash(n - 1, -1);
  for (; p2 < m; p2++) {
    long long val = ar[p2].first;
    while (p1 < n - 1 && vec[p1].first.first <= val) {
      pq.push(vec[p1]);
      p1++;
    }
    if (pq.empty())
      continue;
    else {
      pair<pair<long long, long long>, int> p = pq.top();
      pq.pop();
      if (p.first.second < val) {
        cout << "No";
        return 0;
      } else {
        matched++;
        myhash[p.second] = ar[p2].second;
      }
    }
  }
  if (matched != n - 1) {
    cout << "No";
  } else {
    cout << "Yes\n";
    for (int i = 0; i < n - 1; i++) {
      cout << myhash[i] << " ";
    }
  }
  return 0;
}
