#include <bits/stdc++.h>
using namespace std;
const long long N = (long long)1e6 + 5;
const long long mod = (long long)1e9 + 7;
long long n, m, x[N], y[N], a, res[N];
set<pair<long long, long long> > s;
vector<pair<long long, pair<long long, long long> > > v;
int main() {
  cin >> n >> m;
  for (long long i = 1; i <= n; i++) cin >> x[i] >> y[i];
  for (long long i = 1; i <= m; i++) cin >> a, s.insert(make_pair(a, i));
  for (long long i = 1; i < n; i++)
    v.push_back(make_pair(y[i + 1] - x[i], make_pair(x[i + 1] - y[i], i)));
  sort(v.begin(), v.end());
  for (auto i : v) {
    auto it = s.lower_bound(make_pair(i.second.first, 0));
    if (it == s.end() || it->first > i.first) {
      cout << "No" << endl;
      return 0;
    }
    res[i.second.second] = it->second;
    s.erase(it);
  }
  cout << "Yes" << endl;
  for (long long i = 1; i < n; i++) cout << res[i] << " ";
  return 0;
}
