#include <bits/stdc++.h>
using namespace std;
struct tsob {
  long long x, end;
  int id;
};
inline bool operator<(const tsob &a, const tsob &b) {
  if (a.x != b.x) return a.x < b.x;
  return a.end > b.end;
}
const int maxn = 200005;
priority_queue<pair<long long, int>, vector<pair<long long, int>>,
               greater<pair<long long, int>>>
    q;
vector<tsob> sobs;
int n, m;
long long l[maxn], r[maxn];
int answer[maxn];
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 < n - 1; i++) {
    sobs.push_back({l[i + 1] - r[i], r[i + 1] - l[i], i});
  }
  for (int i = 0; i < m; i++) {
    long long a;
    scanf("%lld", &a);
    sobs.push_back({a, -1, i});
  }
  sort(begin(sobs), end(sobs));
  for (auto x : sobs) {
    if (!q.empty() && q.top().first < x.x) {
      printf("No\n");
      return 0;
    }
    if (x.end == -1) {
      if (!q.empty()) {
        answer[q.top().second] = x.id;
        q.pop();
      }
    } else {
      q.push({x.end, x.id});
    }
  }
  if (!q.empty()) {
    printf("No\n");
    return 0;
  }
  printf("Yes\n");
  for (int i = 0; i < n - 1; i++) printf("%d ", answer[i] + 1);
  return 0;
}
