#include <bits/stdc++.h>
using namespace std;
const int maxn = 200000 + 123;
using LL = long long;
using PLL = pair<LL, LL>;
PLL lr[maxn];
pair<LL, PLL> itv[maxn];
PLL a[maxn];
priority_queue<PLL, vector<PLL>, greater<PLL>> Q;
LL ans[maxn];
LL n, m;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cin >> n >> m;
  for (int i = 0; i < n; ++i) cin >> lr[i].first >> lr[i].second;
  if (!is_sorted(lr, lr + n)) sort(lr, lr + n);
  for (int i = 0; i < n - 1; ++i)
    itv[i] = {lr[i + 1].first - lr[i].second,
              make_pair(lr[i + 1].second - lr[i].first, i)};
  sort(itv, itv + n - 1);
  for (int i = 0; i < m; ++i) {
    LL t;
    cin >> t;
    a[i] = {t, i + 1};
  }
  sort(a, a + m);
  int j(0);
  bool flag(true);
  for (int i = 0; i < m; ++i) {
    while (j < n - 1 && itv[j].first <= a[i].first) {
      Q.push(itv[j].second);
      j++;
    }
    LL r, id;
    if (Q.empty()) continue;
    tie(r, id) = Q.top();
    Q.pop();
    if (r < a[i].first) {
      flag = false;
      break;
    }
    ans[id] = a[i].second;
  }
  if (j == n - 1 && flag) {
    cout << "Yes" << endl;
    cout << ans[0];
    for (int i = 1; i < n - 1; ++i) cout << ' ' << ans[i];
    cout << endl;
  } else
    cout << "No" << endl;
  return 0;
}
