#include <bits/stdc++.h>
using namespace std;
bool cmp(pair<pair<long long, long long>, int> &a,
         pair<pair<long long, long long>, int> &b) {
  if (a.first.second == b.first.second) return a.first.first < b.first.first;
  return a.first.second < b.first.second;
}
long long n, m, lastX, lastY, x, y, ans[200100];
pair<pair<long long, long long>, int> a[200100];
set<pair<long long, long long> > st;
int main() {
  scanf("%lld %lld", &n, &m);
  scanf("%lld %lld", &lastX, &lastY);
  for (int i = 0; i < n - 1; i++) {
    scanf("%lld %lld", &x, &y);
    a[i].first.first = x - lastY;
    a[i].first.second = y - lastX;
    a[i].second = i;
    lastX = x;
    lastY = y;
  }
  sort(a, a + n - 1, cmp);
  for (int i = 0; i < m; i++) {
    scanf("%lld", &x);
    st.insert(make_pair(x, i));
  }
  for (int i = 0; i < n - 1; i++) {
    x = a[i].first.first;
    y = a[i].first.second;
    if (st.empty()) {
      printf("No\n");
      return 0;
    }
    set<pair<long long, long long> >::iterator it =
        st.upper_bound(make_pair(x, -1));
    if (it == st.end()) {
      printf("No\n");
      return 0;
    }
    if (it->first <= y && it->second != -1) {
      ans[a[i].second] = it->second;
      st.erase(it);
    } else {
      printf("No\n");
      return 0;
    }
  }
  printf("Yes\n");
  for (int i = 0; i < n - 1; i++) printf("%lld ", ans[i] + 1);
  return 0;
}
