#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, m;
  cin >> n >> m;
  vector<pair<long long, long long>> ranges;
  for (__typeof(n) i = 0; i < n; i++) {
    long long l, r;
    cin >> l >> r;
    ranges.push_back(make_pair(l, r));
  }
  vector<pair<pair<long long, long long>, long long>> ran;
  for (__typeof(n) i = 1; i < n; i++) {
    ran.push_back(make_pair(make_pair(ranges[i].first - ranges[i - 1].second,
                                      ranges[i].second - ranges[i - 1].first),
                            i - 1));
  }
  vector<pair<long long, long long>> val;
  for (__typeof(m) i = 0; i < m; i++) {
    long long t;
    cin >> t;
    val.push_back(make_pair(t, i));
  }
  sort(val.begin(), val.end());
  sort(ran.begin(), ran.end());
  long long i = 1;
  long long j = 0;
  n--;
  set<pair<long long, long long>> ends;
  long long start = ran[0].first.first;
  ends.insert(make_pair(ran[0].first.second, ran[0].second));
  map<long long, long long> ans;
  while (i < n) {
    long long l = ran[i].first.first;
    long long r = ran[i].first.second;
    long long gg = ran[i].second;
    i++;
    for (auto const& it : ends) {
      if (it.first < l) {
        while (j < m && val[j].first < start) j++;
        if (j == m || val[j].first > it.first) {
          cout << "No" << endl;
          return 0;
        } else {
          ans[it.second] = val[j].second;
          j++;
        }
      } else {
        break;
      }
    }
    while (!ends.empty() && ends.begin()->first < l) {
      ends.erase(ends.begin());
    }
    while (j < m && val[j].first < start) j++;
    if (j == m) {
      cout << "No" << endl;
      return 0;
    }
    while (j < m && val[j].first < l) {
      if (ends.empty()) {
        break;
      }
      auto it = ends.begin();
      ans[it->second] = val[j].second;
      j++;
      ends.erase(it);
    }
    start = l;
    ends.insert(make_pair(r, gg));
  }
  while (j < m && val[j].first < start) j++;
  for (auto const& it : ends) {
    if (j == m || val[j].first > it.first) {
      cout << "No" << endl;
      return 0;
    } else {
      ans[it.second] = val[j].second;
      j++;
    }
  }
  cout << "Yes" << endl;
  for (auto const& it : ans) {
    cout << it.second + 1 << " ";
  }
  return 0;
}
