#include <bits/stdc++.h>
using namespace std;
const int MAXN = 200010;
pair<long long, long long> isl[MAXN];
long long as[MAXN];
long long l[MAXN];
long long r[MAXN];
bool open[MAXN];
struct event {
  int key;
  int idx;
  long long val;
  event(int x, int y, long long z) {
    key = x;
    idx = y;
    val = z;
  }
};
vector<event> e;
bool cmp(event e1, event e2) {
  if (e1.val == e2.val) return e1.key > e2.key;
  return e1.val < e2.val;
}
int ans[MAXN];
struct interval {
  long long val;
  int idx;
  bool operator<(const interval &a) const { return a.val < val; }
  interval(long long x, int y) {
    val = x;
    idx = y;
  }
};
void done() {
  puts("No");
  exit(0);
}
priority_queue<interval> it;
int fin;
int main() {
  int n, m;
  scanf("%d%d", &n, &m);
  for (int i = 0; i < n; i++) scanf("%lld%lld", &isl[i].first, &isl[i].second);
  for (int i = 0; i < m; i++) scanf("%lld", &as[i + 1]);
  for (int i = 0; i < n - 1; i++) l[i] = isl[i + 1].first - isl[i].second;
  for (int i = 0; i < n - 1; i++) r[i] = isl[i + 1].second - isl[i].first;
  n--;
  for (int i = 0; i < n; i++) {
    e.push_back(*(new event(1, i, l[i])));
  }
  for (int i = 0; i < m; i++) {
    e.push_back(*(new event(0, i + 1, as[i + 1])));
  }
  sort(e.begin(), e.end(), cmp);
  for (int i = 0; i < e.size() && fin < n; i++) {
    event next = e[i];
    if (next.key == 0) {
      while ((!it.empty()) && it.top().val < next.val) it.pop();
      if (it.empty()) continue;
      int where = it.top().idx;
      ++fin;
      it.pop();
      ans[where] = next.idx;
    } else if (next.key == 1) {
      ;
      it.push(*(new interval(r[next.idx], next.idx)));
    }
  }
  if (fin < n) done();
  puts("Yes");
  for (int i = 0; i < n; i++) printf("%d ", ans[i]);
  return 0;
}
