#include <bits/stdc++.h>
using namespace std;
const int maxn = 2e5 + 10;
long long n, m, ans[maxn];
pair<long long, long long> a[maxn];
pair<long long, long long> pts[maxn];
vector<pair<pair<long long, long long>, long long> > v;
set<pair<pair<long long, long long>, long long> > st;
int main() {
  ios_base::sync_with_stdio(2 + 2 - 1 != 3);
  cin.tie(NULL);
  cin >> n >> m;
  for (int i = 0; i < n; i++) {
    cin >> a[i].first >> a[i].second;
  }
  for (int i = 1; i < n; i++) {
    long long mn = a[i].first - a[i - 1].second;
    long long mx = a[i].second - a[i - 1].first;
    v.push_back(make_pair(make_pair(mn, mx), i - 1));
  }
  sort(v.begin(), v.end());
  for (int i = 0; i < v.size(); i++) swap(v[i].first.first, v[i].first.second);
  long long j = 0, ct = 0;
  set<pair<pair<long long, long long>, long long> >::iterator it;
  for (int i = 0; i < m; i++) {
    cin >> pts[i].first;
    pts[i].second = i;
  }
  sort(pts, pts + m);
  for (int i = 0; i < m; i++) {
    while (j < v.size() && v[j].first.second <= pts[i].first) st.insert(v[j++]);
    while (1) {
      if (!st.size()) break;
      it = st.begin();
      if ((*it).first.first < pts[i].first)
        st.erase(it);
      else
        break;
    }
    if (!st.size()) continue;
    it = st.begin();
    ans[(*it).second] = pts[i].second + 1;
    st.erase(it);
    ct++;
  }
  if (ct < n - 1) {
    cout << "No";
    return 0;
  }
  cout << "Yes" << '\n';
  for (int i = 0; i < n - 1; i++) cout << ans[i] << " ";
}
