#include <bits/stdc++.h>
using namespace std;
int main() {
  vector<pair<long long, pair<long long, long long>>> island;
  set<pair<long long, long long>> bridges;
  long long n, m, i, j, k;
  scanf("%lld%lld", &n, &m);
  long long l1, l2, r1, r2;
  scanf("%lld%lld", &l1, &r1);
  for (i = 1; i < n; i++) {
    scanf("%lld%lld", &l2, &r2);
    island.push_back(make_pair(r2 - l1, make_pair(l2 - r1, i - 1)));
    l1 = l2;
    r1 = r2;
  }
  sort(island.begin(), island.end());
  for (i = 0; i < m; i++) {
    long long a;
    scanf("%lld", &a);
    bridges.insert(make_pair(a, i + 1));
  }
  long long ans[n - 1];
  for (i = 0; i < n - 1; i++) {
    long long min_d = island[i].second.first, max_d = island[i].first,
              curr = island[i].second.second;
    set<pair<long long, long long>>::iterator it;
    it = bridges.lower_bound(make_pair(min_d, -1));
    if (it->first > max_d || it == bridges.end()) {
      printf("No\n");
      return 0;
    }
    ans[curr] = it->second;
    bridges.erase(it);
  }
  printf("Yes\n");
  for (i = 0; i < n - 1; i++) {
    printf("%lld ", ans[i]);
  }
  printf("\n");
  return 0;
}
