#include <bits/stdc++.h>
using namespace std;
const long long INF = 1E9 + 9;
const int maxn = 2e5 + 6;
struct node {
  long long first, second;
  int id;
  bool operator<(const node &t) const {
    if (second != t.second) return second < t.second;
    return first < t.first;
  }
} d[maxn];
int ans[maxn];
pair<long long, long long> p[maxn];
multiset<pair<long long, long long> > st;
int main() {
  int i, j, n, m, x, y, px, pu;
  scanf("%d%d", &n, &m);
  for (i = 0; i < n; i++) scanf("%lld%lld", &p[i].first, &p[i].second);
  for (i = 0; i < m; i++) {
    long long a;
    scanf("%lld", &a);
    st.insert(make_pair(a, i + 1));
  }
  sort(p, p + n);
  for (i = 0; i < n - 1; i++) {
    d[i].first = p[i + 1].first - p[i].second;
    d[i].second = p[i + 1].second - p[i].first;
    d[i].id = i + 1;
  }
  n--;
  sort(d, d + n);
  for (i = 0; i < n; i++) {
    multiset<pair<long long, long long> >::iterator it =
        st.lower_bound(make_pair(d[i].first, -1));
    if (it == st.end() || it->first > d[i].second) {
      puts("No");
      return 0;
    }
    ans[d[i].id] = it->second;
    st.erase(it);
  }
  puts("Yes");
  for (int i = 1; i <= n; i++) printf("%d ", ans[i]);
  return 0;
}
