#include <bits/stdc++.h>
using namespace std;
struct tup {
  long long as;
  long long bs;
  int is;
};
bool comp(tup a, tup b) {
  if (a.bs < b.bs) {
    return true;
  } else if (a.bs == b.bs) {
    if (a.as > b.as) {
      return true;
    }
  }
  return false;
}
int main() {
  std::ios::sync_with_stdio(false);
  int n, m;
  cin >> n >> m;
  pair<long long, long long> arr[n];
  for (int i = 0; i < n; ++i) {
    cin >> arr[i].first;
    cin >> arr[i].second;
  }
  multiset<pair<long long, long long> > s;
  for (int i = 0; i < m; ++i) {
    long long a;
    cin >> a;
    s.insert(make_pair(a, i));
  }
  vector<tup> v;
  for (int i = 1; i < n; ++i) {
    v.push_back({arr[i].first - arr[i - 1].second,
                 arr[i].second - arr[i - 1].first, i - 1});
  }
  sort(v.begin(), v.end(), comp);
  bool flag = false;
  multiset<pair<long long, long long> >::iterator it;
  vector<int> van;
  van.resize(n - 1);
  for (int i = 0; i < v.size(); ++i) {
    long long a = v[i].as, b = v[i].bs;
    it = s.lower_bound(make_pair(a, -0x7fffffff));
    if (it != s.end()) {
      if (it->first <= b) {
        van[v[i].is] = it->second;
        s.erase(it);
      } else {
        flag = true;
        break;
      }
    } else {
      flag = true;
      break;
    }
  }
  if (flag == true) {
    cout << "No";
    return 0;
  }
  cout << "Yes\n";
  for (int i = 0; i < van.size(); ++i) {
    cout << van[i] + 1 << " ";
  }
}
