#include <bits/stdc++.h>
using namespace std;
int n, m;
vector<pair<long long, long long> > island;
vector<pair<pair<long long, long long>, int> > need;
set<pair<long long, int> > brige;
int ans[200005];
int main() {
  cin >> n >> m;
  for (int i = 0; i < n; i++) {
    long long l, r;
    scanf("%I64d%I64d", &l, &r);
    island.push_back(make_pair(l, r));
  }
  for (int i = 0; i < m; i++) {
    long long temp;
    scanf("%I64d", &temp);
    brige.insert(make_pair(temp, i + 1));
  }
  for (int i = 0; i < n - 1; i++) {
    long long minl = island[i + 1].second - island[i].first;
    long long maxl = island[i + 1].first - island[i].second;
    need.push_back(make_pair(make_pair(minl, maxl), i + 1));
  }
  sort(need.begin(), need.end());
  int ok = true;
  for (int i = 0; i < n - 1; i++) {
    long long maxl = need[i].first.first, minl = need[i].first.second;
    int id = need[i].second;
    auto k = brige.lower_bound(make_pair(minl, 0));
    if (k == brige.end() || k->first > maxl) {
      ok = false;
      break;
    }
    ans[id] = k->second;
    brige.erase(k);
  }
  if (ok) {
    cout << "Yes" << endl;
    for (int i = 1; i < n; i++) printf("%d ", ans[i]);
  } else {
    puts("No");
  }
  return 0;
}
