#include <bits/stdc++.h>
#pragma GCC optimize("O3")
using namespace std;
const int N = 2e5 + 5;
int n, m, ans[N];
long long l[N], r[N];
long long mn[N], mx[N];
set<pair<long long, int>> st;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> m;
  if (n > m + 1) return cout << "No", 0;
  for (int i = 0; i < n; i++) cin >> l[i] >> r[i];
  vector<pair<long long, pair<int, int>>> v;
  for (int i = 0; i < m; i++) {
    long long x;
    cin >> x;
    v.push_back({x, {0, i}});
  }
  for (int i = 1; i < n; i++) {
    mn[i] = l[i] - r[i - 1];
    mx[i] = r[i] - l[i - 1];
    v.push_back({mn[i], {-1, i}});
    v.push_back({mx[i], {1, i}});
  }
  sort(v.begin(), v.end());
  int cnt = 0;
  for (int i = 0; i < v.size(); i++) {
    if (v[i].second.first == -1) {
      st.insert({mx[v[i].second.second], v[i].second.second});
      continue;
    }
    if (v[i].second.first == 1) {
      st.erase({v[i].first, v[i].second.second});
      continue;
    }
    if (!st.size()) continue;
    cnt++;
    auto it = st.begin();
    ans[it->second] = v[i].second.second + 1;
    st.erase(it);
  }
  if (cnt < n - 1) return cout << "No", 0;
  cout << "Yes\n";
  for (int i = 1; i < n; i++) cout << ans[i] << " ";
  return 0;
}
