#include <bits/stdc++.h>
using namespace std;
const int Maxn = 2 * 100000 + 10;
const int Maxm = 2 * 100000 + 10;
int n, m;
long long int l[Maxn], r[Maxn], ans[Maxn];
pair<pair<long long int, long long int>, int> s[Maxn];
pair<long long int, int> a[Maxm];
void input();
void set_seg();
void output();
int main() {
  input();
  set_seg();
  output();
  return 0;
}
void input() {
  cin >> n >> m;
  for (int i = 0; i < n; i++) cin >> l[i] >> r[i];
  for (int i = 0; i < m; i++) cin >> a[i].first;
  for (int i = 0; i < m; i++) a[i].second = i;
  sort(a, a + m);
}
void set_seg() {
  for (int i = 0; i < n - 1; i++) {
    s[i].first.first = l[i + 1] - r[i];
    s[i].first.second = r[i + 1] - l[i];
    s[i].second = i;
  }
  sort(s, s + n - 1);
}
void output() {
  set<pair<long long int, int> > st;
  int x = 0;
  for (int i = 0; i < m; i++) {
    for (; x < n - 1 && s[x].first.first <= a[i].first; x++)
      st.insert(make_pair(s[x].first.second, x));
    if (st.empty()) continue;
    pair<long long int, int> f = *st.begin();
    st.erase(f);
    if (f.first < a[i].first) {
      cout << "No" << endl;
      return;
    }
    ans[s[f.second].second] = a[i].second;
  }
  if (x < n - 1 || st.size() != 0) {
    cout << "No" << endl;
    return;
  }
  cout << "Yes" << endl;
  for (int i = 0; i < n - 1; i++) cout << ans[i] + 1 << " ";
  cout << endl;
}
