#include <bits/stdc++.h>
const double PI = acos(-1.0);
using namespace std;
const int MAXN = 200117;
int n, m, ans[MAXN];
long long l[MAXN], r[MAXN], a[MAXN];
vector<pair<long long, pair<int, int> > > e;
set<pair<long long, int> > q;
int main() {
  scanf("%d %d", &n, &m);
  for (int i = 0; i < n; i++) scanf("%lld %lld", &l[i], &r[i]);
  for (int i = 0; i < m; i++) scanf("%lld", &a[i]);
  for (int i = 0; i < n - 1; i++) {
    e.push_back(make_pair(l[i + 1] - r[i], make_pair(-1, i)));
    e.push_back(make_pair(r[i + 1] - l[i], make_pair(1, i)));
  }
  for (int i = 0; i < m; i++) e.push_back(make_pair(a[i], make_pair(0, i)));
  sort(e.begin(), e.end());
  memset(ans, -1, sizeof(ans));
  for (auto ev : e) {
    if (ev.second.first == -1)
      q.insert(make_pair(r[ev.second.second + 1] - l[ev.second.second],
                         ev.second.second));
    else if (ev.second.first == 1)
      q.erase(make_pair(r[ev.second.second + 1] - l[ev.second.second],
                        ev.second.second));
    else if (((int)(q).size())) {
      int i = q.begin()->second;
      ans[i] = ev.second.second + 1;
      q.erase(q.begin());
    }
  }
  for (int i = 0; i < n - 1; i++)
    if (ans[i] == -1) {
      printf("No\n");
      return 0;
    }
  printf("Yes\n");
  for (int i = 0; i < n - 1; i++) printf("%d ", ans[i]);
  putchar('\n');
  return 0;
}
