#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7;
const int N = 5123;
bool com(const pair<int, pair<long long, long long> > &a,
         const pair<int, pair<long long, long long> > &b) {
  if (a.second.second != b.second.second)
    return (a.second.second < b.second.second);
  if (a.second.first != b.second.first)
    return (a.second.first > b.second.first);
  return (a.first < b.first);
}
int ans[223456] = {0};
int main() {
  int n, m;
  cin >> n >> m;
  vector<pair<int, pair<long long, long long> > > islands(n);
  for (int i = 0; i < n; i++)
    cin >> islands[i].second.first >> islands[i].second.second,
        islands[i].first = i;
  vector<pair<int, pair<long long, long long> > > values(n - 1);
  for (int i = 0; i < n - 1; i++) {
    values[i].first = i;
    values[i].second.first =
        islands[i + 1].second.first - islands[i].second.second;
    values[i].second.second =
        islands[i + 1].second.second - islands[i].second.first;
  }
  sort(values.begin(), values.end(), com);
  vector<pair<long long, long long> > bridges(m);
  for (int i = 0; i < m; i++) cin >> bridges[i].first, bridges[i].second = i;
  sort(bridges.begin(), bridges.end());
  int k = 0, j = 0;
  set<pair<long long, int> > second;
  int ptr = 0;
  n--;
  for (int i = 0; i < n; i++) {
    while (ptr < m && bridges[ptr].first <= values[i].second.second)
      second.insert(bridges[ptr++]);
    set<pair<long long, int> >::iterator it =
        second.lower_bound(make_pair(values[i].second.first, -1));
    if (it == second.end()) {
      cout << "No\n";
      return 0;
    }
    ans[values[i].first] = it->second;
    second.erase(it);
  }
  cout << "Yes" << endl;
  for (int i = 0; i < n; i++) cout << ans[i] + 1 << " \n"[i == n - 1];
  return 0;
}
