#include <bits/stdc++.h>
using namespace std;
struct Need {
  long long x, y;
  int id;
};
int ans[200005];
bool cmp(const Need &a, const Need &b) {
  if (a.y == b.y) return a.x < b.x;
  return a.y < b.y;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n, m;
  cin >> n >> m;
  vector<pair<long long, long long> > islands;
  vector<Need> needs;
  for (int i = 0; i < n; i++) {
    long long l, r;
    cin >> l >> r;
    islands.push_back(make_pair(l, r));
    if (i) {
      long long x = islands[i].first - islands[i - 1].second;
      long long y = islands[i].second - islands[i - 1].first;
      Need need;
      need.x = x;
      need.y = y;
      need.id = i;
      needs.push_back(need);
    }
  }
  sort(needs.begin(), needs.end(), cmp);
  set<pair<long long, int> > bridges;
  for (int i = 0; i < m; i++) {
    long long v;
    cin >> v;
    bridges.insert(make_pair(v, i + 1));
  }
  for (int i = 0; i < needs.size(); i++) {
    set<pair<long long, int> >::iterator it =
        bridges.lower_bound(make_pair(needs[i].x, 0));
    if (it == bridges.end()) {
      cout << "No" << endl;
      return 0;
    }
    pair<long long, int> bridge = *it;
    if (bridge.first > needs[i].y) {
      cout << "No" << endl;
      return 0;
    }
    ans[needs[i].id] = bridge.second;
    bridges.erase(bridge);
  }
  bool first = true;
  cout << "Yes" << endl;
  for (int i = 1; i < n; i++) {
    if (first)
      first = false;
    else
      cout << " ";
    cout << ans[i];
  }
  return 0;
}
