#include <bits/stdc++.h>
using namespace std;
long long inf = 1e18;
const double eps = 1e-8;
long long mod = 1000000007;
int main() {
  ios_base::sync_with_stdio(0);
  int n, m;
  cin >> n >> m;
  long long l[n], r[n], a;
  vector<pair<pair<long long, long long>, int> > v;
  for (int i = 0; i < n; i++) {
    cin >> l[i] >> r[i];
    if (i != 0)
      v.push_back(make_pair(make_pair(l[i] - r[i - 1], r[i] - l[i - 1]), -i));
  }
  for (int i = 0; i < m; i++) {
    cin >> a;
    v.push_back(make_pair(make_pair(a, inf + 1), i + 1));
  }
  sort(v.begin(), v.end());
  int ans[n];
  for (int i = 0; i < n; i++) ans[i] = -1;
  multiset<pair<long long, int> > s;
  for (int i = 0; i < v.size(); i++) {
    if (v[i].second > 0) {
      if (s.size() == 0) continue;
      if (s.begin()->first < v[i].first.first) {
        cout << "No";
        return 0;
      }
      ans[-(s.begin()->second)] = v[i].second;
      s.erase(s.begin());
    } else {
      s.insert(make_pair(v[i].first.second, v[i].second));
    }
  }
  for (int i = 1; i < n; i++)
    if (ans[i] == -1) {
      cout << "No";
      return 0;
    }
  cout << "Yes" << endl;
  for (int i = 1; i < n; i++) cout << ans[i] << " ";
  return 0;
}
