#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
using pii = pair<int, int>;
int const N = 2e5 + 20;
int n, m, res[N];
vector<pair<pii, int>> vec;
set<pii> st;
int32_t main() {
  ios::sync_with_stdio(false), cin.tie(0), cout.tie(0);
  cin >> n >> m;
  for (int i = 0, pl, pr, l, r; i < n; i++) {
    cin >> l >> r;
    if (i) vec.push_back({{r - pl, l - pr}, i - 1});
    pl = l, pr = r;
  }
  for (int i = 0, x; i < m; i++) {
    cin >> x;
    st.insert({x, i});
  }
  sort(vec.begin(), vec.end());
  for (int i = 0; i < n - 1; i++) {
    auto it = st.lower_bound({vec[i].first.second, -1});
    if (it == st.end() || it->first > vec[i].first.first)
      return cout << "No\n", 0;
    res[vec[i].second] = it->second;
    st.erase(it);
  }
  cout << "Yes\n";
  for (int i = 0; i < n - 1; i++) cout << res[i] + 1 << ' ';
  cout << '\n';
}
