#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5;
struct gap {
  long long l;
  long long r;
  long long id;
  gap(long long l = 0, long long r = 0, long long id = 0)
      : l(l), r(r), id(id) {}
  bool operator<(const gap n) const { return r < n.r; }
};
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(nullptr);
  long long n, m;
  long long l1, r1;
  long long l2, r2;
  cin >> n >> m;
  set<pair<long long, long long> > bridges;
  vector<long long> ans(n - 1);
  vector<gap> gaps(n - 1);
  cin >> l1 >> r1;
  for (long long i = 0; i < n - 1; i++) {
    cin >> l2 >> r2;
    gaps[i].r = r2 - l1;
    gaps[i].l = l2 - r1;
    gaps[i].id = i;
    l1 = l2;
    r1 = r2;
  }
  sort(gaps.begin(), gaps.end());
  for (int i = 0; i < m; i++) {
    long long vsp;
    cin >> vsp;
    bridges.insert(make_pair(vsp, i));
  }
  for (int i = 0; i < n - 1; i++) {
    auto it = bridges.lower_bound(make_pair(gaps[i].l, -1));
    if (it == bridges.end() || gaps[i].r < (*it).first) {
      cout << "No\n";
      return 0;
    }
    ans[gaps[i].id] = (*it).second;
    bridges.erase(it);
  }
  cout << "Yes\n";
  for (int i = 0; i < n - 1; i++) {
    cout << ans[i] + 1 << " ";
  }
  return 0;
}
