#include <bits/stdc++.h>
using namespace std;
const int MAX = 200005;
long long xx;
set<pair<long long, int> > bridge;
pair<pair<long long, long long>, int> island[MAX];
int ans[MAX];
int main() {
  int n, m, i;
  scanf("%d%d", &n, &m);
  for (i = 0; i < n; i++)
    scanf("%I64d%I64d", &island[i].first.first, &island[i].first.second);
  for (i = 1; i <= m; i++) {
    scanf("%I64d", &xx);
    bridge.insert(make_pair(xx, i));
  }
  for (i = 0; i < n - 1; i++) {
    long long i_min = island[i + 1].first.first - island[i].first.second;
    long long i_max = island[i + 1].first.second - island[i].first.first;
    island[i].second = i;
    island[i].first.first = i_max;
    island[i].first.second = i_min;
  }
  sort(island, island + n - 1);
  for (i = 0; i < n - 1; i++) {
    set<pair<long long, int> >::iterator it;
    it = bridge.lower_bound(make_pair(island[i].first.second, 0));
    if (it == bridge.end() || (it->first) > island[i].first.first) break;
    ans[island[i].second] = it->second;
    bridge.erase(it);
  }
  if (i == n - 1) {
    puts("Yes");
    for (i = 0; i < n - 2; i++) printf("%d ", ans[i]);
    printf("%d\n", ans[i]);
  } else
    puts("No");
  return 0;
}
