#include <bits/stdc++.h>
using namespace std;
const int M = 2e5 + 10;
pair<long long, int> a[M];
pair<long long, int> c[M];
long long maxlen[M];
int ans[M];
int n, m;
priority_queue<pair<long long, int>, vector<pair<long long, int> >,
               greater<pair<long long, int> > >
    q;
int main() {
  scanf("%d%d", &n, &m);
  long long lstl, lstr;
  long long l, r;
  for (int i = 0; i < n; ++i) {
    scanf("%I64d%I64d", &l, &r);
    if (i) {
      a[i - 1].first = l - lstr;
      a[i - 1].second = i - 1;
      maxlen[i - 1] = r - lstl;
    }
    lstl = l, lstr = r;
  }
  --n;
  sort(a, a + n);
  for (int i = 0; i < m; ++i) {
    scanf("%I64d", &c[i].first);
    c[i].second = i;
  }
  sort(c, c + m);
  int x = 0;
  for (int i = 0; i < m; ++i) {
    while (x < n && a[x].first <= c[i].first) {
      q.push(make_pair(maxlen[a[x].second], a[x].second));
      ++x;
    }
    if (!q.empty()) {
      if (q.top().first < c[i].first) {
        puts("No");
        return 0;
      }
      ans[q.top().second] = c[i].second + 1;
      q.pop();
    }
  }
  for (int i = 0; i < n; ++i)
    if (!ans[i]) {
      puts("No");
      return 0;
    }
  puts("Yes");
  for (int i = 0; i < n; ++i) {
    printf("%d%c", ans[i], " \n"[i == n - 1]);
  }
  return 0;
}
