#include <bits/stdc++.h>
using namespace std;
const int N = 200006;
long long l[N], r[N];
class Interval {
 public:
  Interval(long long _a = 0, long long _b = 0, int _id = 0)
      : a(_a), b(_b), id(_id) {}
  long long a, b;
  int id;
  bool operator<(const Interval& other) const { return b < other.b; }
};
class Bridge {
 public:
  long long length;
  int id;
  bool operator<(const Bridge& other) const { return length < other.length; }
};
Interval inv[N];
Bridge bdg[N];
set<Bridge> s;
set<Bridge>::iterator it;
int ans[N];
int main() {
  int n, m;
  scanf("%d %d", &n, &m);
  for (int i = 1; i <= n; i++) {
    scanf("%I64d %I64d", l + i, r + i);
    if (i > 1) inv[i - 1] = Interval(l[i] - r[i - 1], r[i] - l[i - 1], i - 1);
  }
  sort(inv + 1, inv + n - 1 + 1);
  for (int i = 1; i <= m; i++) {
    scanf("%I64d", &bdg[i].length);
    bdg[i].id = i;
  }
  sort(bdg + 1, bdg + m + 1);
  multiset<Bridge> s;
  Bridge tmp;
  for (int i = 1, j = 1; i < n; i++) {
    while (j <= m && bdg[j].length <= inv[i].b) s.insert(bdg[j++]);
    tmp.length = inv[i].a;
    it = s.lower_bound(tmp);
    if (it == s.end()) {
      puts("No");
      return 0;
    }
    ans[inv[i].id] = it->id;
    s.erase(it);
  }
  puts("Yes");
  for (int i = 1; i < n; i++) printf("%d%c", ans[i], (i == n - 1) ? '\n' : ' ');
  return 0;
}
