#include <bits/stdc++.h>
using namespace std;
bool sortOrd1(pair<long long, long long> i, pair<long long, long long> j) {
  return (i.first < j.first);
}
bool sortOrd2(vector<long long> i, vector<long long> j) {
  return (i[0] < j[0]);
}
int main() {
  long long n, m;
  scanf("%I64d%I64d", &n, &m);
  if (n > m + 1) {
    cout << "No";
    return 0;
  }
  vector<pair<long long, long long>> a;
  long long t1, t2;
  for (int i = 0; i < n; i++) {
    scanf("%I64d%I64d", &t1, &t2);
    a.push_back(make_pair(t1, t2));
  }
  sort(a.begin(), a.end(), sortOrd1);
  vector<vector<long long>> gap;
  for (int i = 1; i < a.size(); i++) {
    gap.push_back(
        {a[i].second - a[i - 1].first, a[i].first - a[i - 1].second, i});
  }
  sort(gap.begin(), gap.end(), sortOrd2);
  multiset<pair<long long, long long>> b;
  for (int i = 0; i < m; i++) {
    long long t;
    scanf("%I64d", &t);
    b.insert(make_pair(t, i));
  }
  long long res = 0;
  long long ans[n];
  multiset<pair<long long, long long>>::iterator it;
  pair<long long, long long> t;
  for (int i = 0; i < gap.size(); i++) {
    it = b.lower_bound(make_pair(gap[i][1], -1));
    t = *it;
    if (t.first >= gap[i][1] && t.first <= gap[i][0]) {
      ans[gap[i][2] - 1] = t.second + 1;
      b.erase(*it);
    } else {
      cout << "No";
      return 0;
    }
  }
  cout << "Yes"
       << "\n";
  for (int i = 0; i < n - 1; i++) cout << ans[i] << " ";
  return 0;
}
