#include <bits/stdc++.h>
using namespace std;
const int inf = 0x3f3f3f3f;
const long long INF = 2e18;
const int N = 231234;
int n, m;
set<pair<long long, long long> > st;
pair<long long, long long> pd[N];
pair<pair<long long, long long>, long long> brid[N];
int ans[N];
int main() {
  while (scanf("%d%d", &n, &m) != EOF) {
    int i, j;
    for (i = 0; i < n; ++i) {
      scanf("%I64d%I64d", &pd[i].first, &pd[i].second);
    }
    sort(pd, pd + n);
    for (i = 0; i < n - 1; ++i) {
      brid[i] = make_pair(make_pair(pd[i + 1].second - pd[i].first,
                                    pd[i + 1].first - pd[i].second),
                          i);
    }
    sort(brid, brid + n - 1);
    for (i = 0; i < m; ++i) {
      long long x;
      scanf("%I64d", &x);
      st.insert(make_pair(x, i + 1));
    }
    int ok = 1;
    for (i = 0; i < n - 1; ++i) {
      set<pair<long long, long long> >::iterator iter =
          st.lower_bound(make_pair(brid[i].first.second, 0));
      if (iter == st.end() || iter->first > brid[i].first.first) {
        ok = 0;
        break;
      }
      ans[brid[i].second] = iter->second;
      st.erase(iter);
    }
    if (!ok)
      puts("No");
    else {
      puts("Yes");
      for (i = 0; i < n - 1; ++i) {
        printf("%d ", ans[i]);
      }
      puts("");
    }
  }
}
