#include <bits/stdc++.h>
using namespace std;
priority_queue<pair<long long, long long> > Q;
pair<pair<long long, long long>, long long> a[200005];
pair<long long, long long> tmp[200005];
long long b[200005], l[200005], r[200005], ans[200005];
int main() {
  long long n, m;
  scanf("%I64d%I64d", &n, &m);
  for (long long i = 1; i <= n; i++) scanf("%I64d %I64d", &l[i], &r[i]);
  for (long long i = 1; i < n; i++)
    a[i] = make_pair(make_pair(l[i + 1] - r[i], r[i + 1] - l[i]), i);
  sort(a + 1, a + n);
  for (long long i = 1; i <= m; i++)
    scanf("%I64d", &b[i]), tmp[i] = make_pair(b[i], i);
  sort(tmp + 1, tmp + 1 + m);
  long long now = 1, sum = 0;
  for (long long i = 1; i <= m; i++) {
    while (a[now].first.first <= tmp[i].first && now < n)
      Q.push(make_pair(-a[now].first.second, a[now].second)), now++;
    while (!Q.empty()) {
      pair<long long, long long> t = Q.top();
      if (-t.first < tmp[i].first) break;
      Q.pop();
      ans[t.second] = tmp[i].second;
      sum++;
      break;
    }
  }
  if (sum == n - 1) {
    puts("Yes");
    for (long long i = 1; i < n; i++) printf("%I64d ", ans[i]);
    puts("");
  } else
    puts("No");
  return 0;
}
