#include <bits/stdc++.h>
using namespace std;
pair<pair<long long, long long>, int> ans[200010];
pair<long long, int> a[200010];
int ne[200010];
long long l[200010], r[200010];
multiset<pair<long long, int>> ss;
int main() {
  int n, m;
  scanf("%d%d", &n, &m);
  for (int i = 0; i < n; i++) {
    scanf("%I64d%I64d", &l[i], &r[i]);
  }
  for (int i = 0; i < n - 1; i++) {
    pair<long long, long long> anss = {l[i + 1] - r[i], r[i + 1] - l[i]};
    ans[i] = {anss, i};
  }
  for (int i = 0; i < m; i++) {
    long long x;
    scanf("%I64d", &x);
    a[i] = {x, i};
  }
  sort(ans, ans + n - 1);
  sort(a, a + m);
  for (int i = 0; i < m; i++) {
    ss.insert(a[i]);
  }
  int sol = 0;
  for (int i = n - 2; i >= 0; i--) {
    auto pos =
        ss.lower_bound(pair<long long, int>{ans[i].first.second + 1, -1});
    if (pos != ss.begin()) {
      pos--;
      if (pos->first >= ans[i].first.first) {
        ne[ans[i].second] = pos->second;
        ss.erase(pos);
        sol++;
      }
    }
  }
  if (sol == n - 1) {
    puts("Yes");
    for (int i = 0; i < n - 1; i++) {
      printf("%d ", ne[i] + 1);
    }
    puts("");
  } else {
    puts("No");
  }
  return 0;
}
