#include <bits/stdc++.h>
using namespace std;
const int MAXN = 200010;
template <class T>
inline void read(T& x) {
  int c;
  for (c = getchar(); c <= 32 && ~c; c = getchar())
    ;
  for (x = 0; c > 32; x = x * 10 + c - '0', c = getchar())
    ;
}
struct node {
  long long len;
  int id;
  node() {}
  node(long long a, int i) : len(a), id(i) {}
};
struct land {
  long long l, r;
  int id;
  land() {}
  land(long long a, long long b, int i) : l(a), r(b), id(i) {}
};
vector<land> range;
vector<node> bridge;
int ans[MAXN];
int main() {
  int m, n;
  read(n), read(m);
  long long l1, l2, r1, r2, t;
  read(l1), read(r1);
  for (int i = 1; i < n; i++) {
    read(l2), read(r2);
    range.push_back(land(l2 - r1, r2 - l1, i));
    l1 = l2, r1 = r2;
  }
  for (int i = 1; i <= m; i++) {
    read(t);
    bridge.push_back(node(t, i));
  }
  sort(bridge.begin(), bridge.end(),
       [&](const node& a, const node& b) { return a.len < b.len; });
  sort(range.begin(), range.end(),
       [&](const land& a, const land& b) { return a.r < b.r; });
  set<pair<long long, int> > gao;
  for (auto&& f : bridge) {
    gao.insert(make_pair(f.len, f.id));
  }
  bool flag = 1;
  for (auto&& f : range) {
    auto it = gao.lower_bound(make_pair(f.l, 0));
    if (it == gao.end() || it->first > f.r) {
      flag = 0;
      break;
    }
    ans[f.id] = it->second;
    gao.erase(it);
  }
  if (flag) {
    puts("Yes");
    for (int i = 1; i <= n - 1; i++) {
      printf("%d%c", ans[i], i == n - 1 ? '\n' : ' ');
    }
  } else
    puts("No");
  return 0;
}
