#include <bits/stdc++.h>
using namespace std;
const long long MX = 2e5 + 9;
long long ans[MX];
pair<long long, long long> isl[MX];
vector<pair<pair<long long, long long>, long long> > v;
set<pair<long long, long long> > s;
bool f(pair<pair<long long, long long>, long long> i,
       pair<pair<long long, long long>, long long> j) {
  return i.first.second < j.first.second;
}
int32_t main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  long long n, m;
  cin >> n >> m;
  for (long long i = 0; i < n; i++) {
    cin >> isl[i].first >> isl[i].second;
  }
  for (long long i = 1; i < n; i++) {
    v.push_back(
        {{isl[i].first - isl[i - 1].second, isl[i].second - isl[i - 1].first},
         i - 1});
  }
  sort(v.begin(), v.end(), f);
  for (long long i = 0; i < m; i++) {
    long long x;
    cin >> x;
    s.insert({x, i + 1});
  }
  if (m < n - 1) {
    cout << "No";
    return 0;
  }
  for (long long i = 0; i < n - 1; i++) {
    auto it = s.upper_bound({v[i].first.first, 0});
    if (it == s.end() || (*it).first > v[i].first.second) {
      cout << "No";
      return 0;
    }
    ans[v[i].second] = (*it).second;
    s.erase(it);
  }
  cout << "Yes" << endl;
  for (long long i = 0; i < n - 1; i++) {
    cout << ans[i] << " ";
  }
  return 0;
}
