#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1e9 + 7;
const double eps = 1e-8;
const int maxN = 2e5 + 10;
const int maxL = 45;
const long long inf = 1e18;
int n, m;
int ans[maxN];
vector<pair<pair<long long, int>, int> > eve;
pair<long long, long long> br[maxN];
set<pair<long long, int> > s;
inline void init() {
  long long l1, l2, r1, r2;
  cin >> n >> m;
  for (int i = 0; i < n; i++) {
    cin >> l1 >> r1;
    if (i) {
      long long x = r1 - l2;
      long long y = l1 - r2;
      eve.push_back(make_pair(make_pair(y, 0), i));
      eve.push_back(make_pair(make_pair(x, 2), i));
      br[i] = make_pair(y, x);
    }
    l2 = l1;
    r2 = r1;
  }
  long long a;
  for (int i = 0; i < m; i++) {
    cin >> a;
    eve.push_back(make_pair(make_pair(a, 1), i));
  }
  sort(eve.begin(), eve.end());
}
inline void solve() {
  bool pos = true;
  for (int i = 0; i < eve.size(); i++) {
    pair<pair<long long, int>, int> t = eve[i];
    if (t.first.second == 1 && s.size()) {
      pair<long long, long long> fr = *(s.begin());
      s.erase(s.begin());
      ans[fr.second] = t.second;
    } else if (t.first.second == 0) {
      s.insert(make_pair(br[t.second].second, t.second));
    } else {
      if (s.find(make_pair(br[t.second].second, t.second)) != s.end()) {
        pos = false;
        break;
      }
    }
  }
  if (pos) {
    cout << "Yes" << endl;
    for (int i = 1; i < n; i++) cout << ans[i] + 1 << " ";
    cout << endl;
  } else
    cout << "No" << endl;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie();
  cout.tie();
  init();
  solve();
  return 0;
}
