#include <bits/stdc++.h>
using namespace std;
multiset<pair<long long, int> > s;
pair<pair<long long, long long>, int> a[200005];
pair<long long, int> b[200005];
int ans[200005];
long long l[200005];
bool v[200005];
long long r[200005];
int main() {
  int n, m;
  scanf("%d%d", &n, &m);
  for (int i = 0; i < n; i++) scanf("%lld%lld", &l[i], &r[i]);
  for (int i = 0; i < n - 1; i++) {
    a[i].first.first = l[i + 1] - r[i];
    a[i].first.second = r[i + 1] - l[i];
    a[i].second = i;
  }
  n--;
  sort(a, a + n);
  for (int i = 0; i < m; i++) {
    scanf("%lld", &b[i].first);
    b[i].second = i;
  }
  sort(b, b + m);
  s.clear();
  int ind = 0;
  for (int i = 0; i < m; i++) {
    while (ind < n) {
      if (a[ind].first.first <= b[i].first) {
        s.insert(make_pair(a[ind].first.second, a[ind].second));
      } else
        break;
      ind++;
    }
    if (s.size() > 0 && (*s.begin()).first >= b[i].first) {
      ans[(*s.begin()).second] = b[i].second + 1;
      v[(*s.begin()).second] = true;
      s.erase(s.begin());
    }
  }
  for (int i = 0; i < n; i++)
    if (!v[i]) {
      puts("No");
      return 0;
    }
  printf("Yes\n");
  for (int i = 0; i < n; i++) printf("%d ", ans[i]);
}
