#include <bits/stdc++.h>
using namespace std;
const int Dim = 200002;
struct Component {
  long long dist1, dist2, idx;
};
Component T[Dim];
pair<long long, long long> A[Dim], B[Dim];
set<pair<long long, int> > S;
int N, M, Sol[Dim];
bool Compare(Component A, Component B) {
  if (A.dist2 != B.dist2) return (A.dist2 < B.dist2);
  if (A.dist1 != B.dist1) return (A.dist1 < B.dist1);
  return (A.idx < B.idx);
}
int main() {
  cin >> N >> M;
  for (int i = 0; i < N; i++) cin >> A[i].first >> A[i].second;
  N--;
  for (int i = 0; i < N; i++) {
    T[i].dist1 = A[i + 1].first - A[i].second;
    T[i].dist2 = A[i + 1].second - A[i].first;
    T[i].idx = i;
  }
  sort(T, T + N, Compare);
  for (int i = 0; i < M; i++) {
    cin >> B[i].first;
    B[i].second = i;
  }
  sort(B, B + M);
  int it = 0;
  for (int i = 0; i < N; i++) {
    while (it < M && B[it].first <= T[i].dist2) S.insert(B[it++]);
    set<pair<long long, int> >::iterator itr =
        S.lower_bound(make_pair(T[i].dist1, 0));
    if (itr == S.end()) {
      cout << "No\n";
      return 0;
    }
    Sol[T[i].idx] = itr->second;
    S.erase(itr);
  }
  cout << "Yes\n";
  for (int i = 0; i < N; i++) cout << Sol[i] + 1 << " ";
  cout << "\n";
  return 0;
}
