#include <bits/stdc++.h>
using namespace std;
long long int powmod(long long int a, long long int b) {
  if (b == 0) return 1;
  long long int x = powmod(a, b / 2);
  long long int y = (x * x) % 1000000007;
  if (b % 2) return (a * y) % 1000000007;
  return y % 1000000007;
}
long long int l[200010], r[200010];
pair<long long int, int> a[200010];
int check[200010];
set<pair<long long int, int> > s;
vector<pair<pair<long long int, long long int>, int> > bridge;
int main() {
  int n, m;
  scanf("%d", &n), scanf("%d", &m);
  for (int i = 0; i < n; i++) scanf("%lld", &l[i]), scanf("%lld", &r[i]);
  for (int i = 1; i < n; i++)
    bridge.push_back(
        make_pair(make_pair(r[i] - l[i - 1], l[i] - r[i - 1]), (i - 1)));
  sort((bridge).begin(), (bridge).end());
  for (int i = 0; i < m; i++) {
    long long int temp;
    scanf("%lld", &temp);
    a[i] = {temp, i};
    s.insert(a[i]);
  }
  sort(a, a + m);
  int j = 0;
  for (int i = 0; i < (int)(bridge.size()); i++) {
    set<pair<long long int, int> >::iterator it =
        s.lower_bound(make_pair(bridge[i].first.second, -1));
    if (it == s.end()) {
      printf("No\n");
      return 0;
    }
    pair<long long int, int> p = *it;
    if (p.first > bridge[i].first.first) {
      printf("No\n");
      return 0;
    }
    check[bridge[i].second] = p.second + 1;
    s.erase(*it);
  }
  printf("Yes\n");
  for (int i = 0; i < n - 1; i++) printf("%d ", check[i]);
  printf("\n");
  return 0;
}
