#include <bits/stdc++.h>
using namespace std;
const long long INF = ~(1 << 31);
const double pi = acos(-1);
int main() {
  cin.sync_with_stdio(false);
  long long n, m;
  cin >> n >> m;
  vector<pair<long long, long long>> ok(n);
  vector<pair<long long, long long>> k(m);
  for (long long i = (0); i < (n); i++) {
    cin >> ok[i].first >> ok[i].second;
  }
  vector<long long> arr(m);
  for (long long i = (0); i < (m); i++) {
    cin >> k[i].first;
    k[i].second = i;
  }
  long long used[200020];
  priority_queue<pair<long long, pair<long long, long long>>,
                 vector<pair<long long, pair<long long, long long>>>,
                 greater<pair<long long, pair<long long, long long>>>>
      first;
  for (long long i = (0); i < (n - 1); i++) {
    first.push(pair<long long, pair<long long, long long>>(
        ok[i + 1].first - ok[i].second,
        pair<long long, long long>(ok[i + 1].second - ok[i].first, i)));
  }
  sort(k.begin(), k.end());
  priority_queue<pair<long long, pair<long long, long long>>,
                 vector<pair<long long, pair<long long, long long>>>,
                 greater<pair<long long, pair<long long, long long>>>>
      pq;
  for (long long i = (0); i < (m); i++) {
    while (true) {
      if (first.empty()) break;
      pair<long long, pair<long long, long long>> m = first.top();
      if (m.first <= k[i].first) {
        pq.push(pair<long long, pair<long long, long long>>(
            m.second.first,
            pair<long long, long long>(m.first, m.second.second)));
        first.pop();
      } else
        break;
    }
    if (pq.empty()) {
      if (first.empty() && pq.empty()) {
        break;
      }
      continue;
      return 0;
    }
    pair<long long, pair<long long, long long>> m = pq.top();
    if (m.second.first <= k[i].first && k[i].first <= m.first) {
      used[m.second.second] = k[i].second;
      pq.pop();
    } else {
      cout << "No" << endl;
      return 0;
    }
  }
  if (first.size() != 0 || pq.size() != 0) {
    cout << "No" << endl;
    return 0;
  }
  cout << "Yes" << endl;
  for (long long i = (0); i < (n - 1); i++) cout << used[i] + 1 << " ";
  cout << endl;
  return 0;
}
