#include <bits/stdc++.h>
using namespace std;
using i64 = long long;
using Pii = pair<int, int>;
constexpr int MAX = 400010;
struct Event {
  i64 l, r;
  int id;
  bool operator<(const Event& o) const { return r == o.r ? l < o.r : r < o.r; }
} e[MAX];
i64 l[MAX], r[MAX], w[MAX];
int ans[MAX];
map<i64, queue<int>> mp;
bool solve(int n, int m) {
  int s = 0;
  for (int i = 1; i < n; ++i) {
    e[s++] = {l[i] - r[i - 1], r[i] - l[i - 1], i};
  }
  mp.clear();
  for (int i = 0; i < m; ++i) {
    auto it = mp.find(w[i]);
    if (it == mp.end()) mp.insert({w[i], queue<int>{}});
    mp[w[i]].push(i + 1);
  }
  sort(e, e + s);
  for (int i = 0; i < s; ++i) {
    auto it = mp.lower_bound(e[i].l);
    if (it == end(mp) || it->first > e[i].r) return false;
    ans[e[i].id] = it->second.front();
    it->second.pop();
    if (it->second.empty()) {
      mp.erase(it);
    }
  }
  return true;
}
int main() {
  int n, m;
  while (cin >> n >> m) {
    for (int i = 0; i < n; ++i) {
      cin >> l[i] >> r[i];
    }
    for (int i = 0; i < m; ++i) {
      cin >> w[i];
    }
    if (!solve(n, m)) {
      printf("No\n");
    } else {
      printf("Yes\n");
      for (int i = 1; i < n; ++i) {
        printf("%d%c", ans[i], i < n - 1 ? ' ' : '\n');
      }
    }
  }
  return 0;
}
