#include <bits/stdc++.h>
using namespace std;
void RI() {}
template <typename... T>
void RI(int& head, T&... tail) {
  scanf("%d", &head);
  RI(tail...);
}
int n, m;
pair<long long, long long> isd[200100];
pair<pair<long long, long long>, int> q[200100];
pair<long long, int> bg[200100];
int ans[200100];
bool compare(pair<pair<long long, long long>, int>& q1,
             pair<pair<long long, long long>, int>& q2) {
  return q1.first.second > q2.first.second;
}
priority_queue<pair<pair<long long, long long>, int>,
               vector<pair<pair<long long, long long>, int>>,
               function<bool(pair<pair<long long, long long>, int>&,
                             pair<pair<long long, long long>, int>&)>>
    pq(compare);
void input() {
  RI(n, m);
  for (int i = 0; i < int(n); i++) cin >> isd[i].first >> isd[i].second;
  for (int i = 0; i < int(n - 1); i++) {
    q[i] = make_pair(make_pair(isd[i + 1].first - isd[i].second,
                               isd[i + 1].second - isd[i].first),
                     i);
  }
  sort(q, q + n - 1);
  long long x;
  for (int i = 0; i < int(m); i++) {
    cin >> x;
    bg[i] = make_pair(x, i);
  }
  sort(bg, bg + m);
}
void build() {}
void solve() {
  int j = 0;
  for (int i = 0; i < int(m); i++) {
    for (; j < n - 1 && q[j].first.first <= bg[i].first; j++) pq.push(q[j]);
    if (pq.empty()) continue;
    if (bg[i].first <= pq.top().first.second) {
      pair<pair<long long, long long>, int> qnow = pq.top();
      pq.pop();
      ans[qnow.second] = bg[i].second;
    } else {
      puts("No");
      return;
    }
  }
  if (!pq.empty() || j < n - 1) {
    puts("No");
    return;
  }
  puts("Yes");
  for (int i = 0; i < int(n - 1); i++)
    printf("%d%c", ans[i] + 1, i == n - 2 ? '\n' : ' ');
}
int main() {
  input();
  build();
  solve();
  return 0;
}
