#include <bits/stdc++.h>
using namespace std;
const int inf = (1 << 30) - 1;
const long long linf = (1ll << 62) - 1;
const int N = 1e6 + 100;
int n, m;
long long ls[N], rs[N], l[N], r[N], a[N];
struct event {
  long long x;
  int type, index;
  friend bool operator<(const event &a, const event &b) {
    return make_pair(a.x, a.type) < make_pair(b.x, b.type);
  }
};
int main() {
  cin >> n >> m;
  for (int i = 0; i < n; i++) {
    scanf("%I64d%I64d", &ls[i], &rs[i]);
  }
  for (int i = 0; i < m; i++) {
    scanf("%I64d", &a[i]);
  }
  for (int i = 0; i < n - 1; i++) {
    l[i] = ls[i + 1] - rs[i];
    r[i] = rs[i + 1] - ls[i];
  }
  n--;
  vector<event> events;
  for (int i = 0; i < n; i++) {
    events.push_back({l[i], -1, i});
    events.push_back({r[i], 1, i});
  }
  for (int i = 0; i < m; i++) {
    events.push_back({a[i], 0, i});
  }
  sort((events).begin(), (events).end());
  set<pair<long long, int>> q;
  vector<int> ans(n, -1);
  for (const event &e : events) {
    if (e.type == -1) {
      q.insert(make_pair(r[e.index], e.index));
    }
    if (e.type == 0 && !q.empty()) {
      int v = q.begin()->second;
      ans[v] = e.index;
      q.erase(q.begin());
    }
    if (e.type == 1) {
      q.erase(make_pair(r[e.index], e.index));
    }
  }
  if (find((ans).begin(), (ans).end(), -1) != ans.end()) {
    puts("No");
  } else {
    puts("Yes");
    for (int i : ans) {
      printf("%d ", i + 1);
    }
    puts("");
  }
  return 0;
}
