#include <bits/stdc++.h>
using namespace std;
template <class c>
struct rge {
  c b, e;
};
template <class c>
rge<c> range(c i, c j) {
  return rge<c>{i, j};
}
template <class c>
auto dud(c* x) -> decltype(cerr << *x, 0);
template <class c>
char dud(...);
struct debug {
  template <class c>
  debug& operator<<(const c&) {
    return *this;
  }
};
int ans[200020];
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n, m;
  cin >> n >> m;
  long long p1 = 0, p2 = 0;
  vector<pair<pair<long long, long long>, int>> v;
  for (int i = 0; i < n; i++) {
    long long x, y;
    cin >> x >> y;
    if (!p1)
      p1 = x, p2 = y;
    else {
      v.push_back({{y - p1, x - p2}, i});
      p1 = x, p2 = y;
    }
  }
  sort(v.begin(), v.end());
  set<pair<long long, int>> st;
  for (int i = 1; i <= m; i++) {
    long long c;
    cin >> c;
    st.insert({c, i});
  }
  int i = 0;
  bool ok = 1;
  while (i < v.size()) {
    set<pair<long long, int>>::iterator it =
        st.lower_bound({v[i].first.second, 0});
    if (it == st.end()) {
      ok = 0;
      break;
    }
    if (it->first > v[i].first.first) {
      ok = 0;
      break;
    }
    ans[v[i].second] = it->second;
    st.erase(it);
    i++;
  }
  if (!ok)
    cout << "No\n";
  else {
    cout << "Yes\n";
    for (i = 1; i < n; i++) cout << ans[i] << ' ';
    cout << '\n';
  }
  return 0;
}
