#include <bits/stdc++.h>
using namespace std;
int n, m, ans[200000];
long long l[200000], r[200000];
pair<long long, long long> q[200000];
struct D {
  int id;
  long long first, second;
};
vector<D> p;
int main() {
  scanf("%d %d", &n, &m);
  for (int i = 0; i < n; ++i) {
    scanf("%I64d %I64d", &l[i], &r[i]);
    if (i > 0) {
      p.push_back(D{i, l[i] - r[i - 1], r[i] - l[i - 1]});
    }
  }
  for (int i = 0; i < m; ++i) scanf("%I64d", &q[i].first), q[i].second = i;
  sort(q, q + m);
  sort(p.begin(), p.end(), [](D a, D b) { return a.first < b.first; });
  auto comp = [](D a, D b) -> bool { return a.second > b.second; };
  priority_queue<D, vector<D>, decltype(comp)> pq(comp);
  auto i = q;
  auto j = p.begin();
  for (; i != q + m; ++i) {
    while (j != p.end() && j->first <= i->first) {
      pq.push(*j);
      ++j;
    }
    if (!pq.empty() && pq.top().second < i->first) {
      printf("No\n");
      return 0;
    }
    if (!pq.empty()) {
      ans[pq.top().id] = i->second;
      pq.pop();
    }
  }
  if (!pq.empty() || j != p.end())
    printf("No\n");
  else {
    printf("Yes\n");
    for (int i = 1; i < n; ++i) printf("%d ", ans[i] + 1);
    printf("\n");
  }
}
