#include <bits/stdc++.h>
using namespace std;
int n, m;
set<pair<long long, int> > brige;
pair<pair<long long, long long>, int> is[200100];
int ans[200100];
int i, j, k;
long long x;
long long Min, Max;
int main() {
  scanf("%d%d", &n, &m);
  for (i = 1; i <= n; i++)
    scanf("%I64d%I64d", &is[i].first.first, &is[i].first.second);
  for (i = 1; i <= m; i++) {
    scanf("%I64d", &x);
    brige.insert(make_pair(x, i));
  }
  for (i = 1; i < n; i++) {
    Min = is[i + 1].first.first - is[i].first.second;
    Max = is[i + 1].first.second - is[i].first.first;
    is[i].first.first = Max;
    is[i].first.second = Min;
    is[i].second = i;
  }
  sort(is + 1, is + n);
  for (i = 1; i <= n - 1; i++) {
    set<pair<long long, int> >::iterator it;
    it = brige.lower_bound(make_pair(is[i].first.second, 0));
    if (it == brige.end() || (it->first) > is[i].first.first) break;
    ans[is[i].second] = it->second;
    brige.erase(it);
  }
  if (i == n) {
    printf("Yes\n");
    for (i = 1; i < n - 1; i++) printf("%d ", ans[i]);
    printf("%d\n", ans[n - 1]);
  } else {
    printf("No\n");
  }
  return 0;
}
