#include <bits/stdc++.h>
using namespace std;
const int N = 200005;
void FAIL() {
  puts("No");
  exit(0);
}
long long L[N], R[N], a[N];
struct Node {
  long long l, r;
  int id;
  Node() {}
  Node(long long _l, long long _r, int _id) {
    l = _l;
    r = _r;
    id = _id;
  }
  bool operator<(const Node &a) const { return r < a.r; }
} p[N];
inline bool cmp(int x, int y) { return a[x] < a[y]; }
int id[N];
set<pair<long long, int> > st;
int ans[N];
int main() {
  int n, m;
  scanf("%d%d", &n, &m);
  if (m + 1 < n) FAIL();
  for (int i = 1; i <= n; ++i) {
    scanf("%I64d%I64d", L + i, R + i);
  }
  for (int i = 1; i <= m; ++i) {
    scanf("%I64d", a + i);
  }
  int cc = 0;
  for (int i = 2; i <= n; ++i) {
    p[cc++] = Node(L[i] - R[i - 1], R[i] - L[i - 1], i);
  }
  for (int i = 1; i <= m; ++i) id[i] = i;
  sort(id + 1, id + 1 + m, cmp);
  sort(p, p + cc);
  for (int i = 0, j = 1; i < cc; ++i) {
    for (; j <= m && a[id[j]] <= p[i].r; ++j) {
      st.insert(make_pair(a[id[j]], id[j]));
    }
    set<pair<long long, int> >::iterator it =
        st.lower_bound(make_pair(p[i].l, -1));
    if (it == st.end()) FAIL();
    ans[p[i].id] = it->second;
    st.erase(it);
  }
  puts("Yes");
  for (int i = 2; i <= n; ++i) printf("%d ", ans[i]);
  return 0;
}
