#include <bits/stdc++.h>
using namespace std;
long double pi = 3.14159265358979323;
int ten[8] = {1, 10, 100, 1000, 10000, 100000, 1000000, 10000000};
const int S = 200001;
struct Segment {
  short t;
  long long d;
  long long r;
  int i;
} s[3 * S];
bool by_d(Segment &s1, Segment &s2) {
  if (s1.d < s2.d)
    return true;
  else if (s1.d == s2.d && s1.t < s2.t)
    return true;
  return false;
}
int main() {
  int n, m, t = 0;
  long long l1, r1, l2, r2;
  cin >> n >> m >> l1 >> r1;
  for (int i = 0; i < n - 1; ++i) {
    scanf("%I64d%I64d", &l2, &r2);
    s[t].t = 0;
    s[t].d = l2 - r1;
    s[t].r = r2 - l1;
    s[t++].i = i;
    s[t].t = 2;
    s[t].d = r2 - l1;
    s[t++].i = i;
    l1 = l2;
    r1 = r2;
  }
  for (int i = 1; i <= m; ++i) {
    s[t].t = 1;
    scanf("%I64d", &s[t].d);
    s[t++].i = i;
  }
  sort(s, s + t, by_d);
  int ans[S] = {0};
  set<pair<long long, int> > st;
  set<pair<long long, int> >::iterator it;
  for (int i = 0; i < t; ++i) {
    switch (s[i].t) {
      case 0:
        st.insert(pair<long long, int>(s[i].r, s[i].i));
        break;
      case 1:
        it = st.begin();
        if (it != st.end()) {
          ans[(*it).second] = s[i].i;
          st.erase(it);
        }
        break;
      case 2:
        st.erase(pair<long long, int>(s[i].d, s[i].i));
        break;
    }
  }
  for (int i = 0; i < n - 1; ++i) {
    if (ans[i] == 0) {
      cout << "No\n";
      return 0;
    }
  }
  cout << "Yes\n";
  for (int i = 0; i < n - 1; ++i) printf("%d ", ans[i]);
  cout << '\n';
  return 0;
}
