#include <bits/stdc++.h>
using namespace std;
vector<pair<long long, long long> > vec;
pair<long long, long long> p[200005];
pair<pair<long long, long long>, long long> a[200005];
multiset<long long> m;
map<long long, list<long long> > val;
int main() {
  long long n, t, temp;
  cin >> n >> t;
  for (long long i = 0; i < n; i++) {
    cin >> p[i].first >> p[i].second;
  }
  for (long long i = 1; i < n; i++) {
    a[i].first.second = p[i].first - p[i - 1].second;
    a[i].first.first = p[i].second - p[i - 1].first;
    a[i].second = i;
  }
  sort(a + 1, a + n);
  for (long long i = 0; i < t; i++) {
    cin >> temp;
    val[temp].push_back(i + 1);
    m.insert(temp);
  }
  for (int i = 1; i < n; i++) {
    if (m.lower_bound(a[i].first.second) == m.end()) {
      cout << "No";
      return 0;
    } else {
      temp = *m.lower_bound(a[i].first.second);
      if (temp > a[i].first.first) {
        cout << "No";
        return 0;
      }
      m.erase(m.find(temp));
    }
    vec.push_back(make_pair(a[i].second, temp));
  }
  sort(vec.begin(), vec.end());
  if (vec.size() != (n - 1)) {
    cout << "No";
    return 0;
  } else {
    cout << "Yes" << endl;
    for (int i = 0; i < vec.size(); i++) {
      temp = val[vec[i].second].front();
      val[vec[i].second].pop_front();
      cout << temp << " ";
    }
  }
}
