#include <bits/stdc++.h>
using namespace std;
const int maxn = 200000 + 10;
struct node {
  long long M, MM;
  int id;
  node() {}
  node(long long M, long long MM, int id) : M(M), MM(MM), id(id) {}
  bool operator<(const node &A) const { return M > A.M; }
} islands[maxn], bridges[maxn];
bool cmp(node a, node b) { return a.M < b.M; }
struct AA {
  long long x;
  int id;
  AA() {}
  AA(long long x, int id) : x(x), id(id) {}
  bool operator<(const AA &A) const { return x < A.x; }
} a[maxn];
long long x;
int ans[maxn];
priority_queue<node> Q;
int main() {
  int n, m;
  while (scanf("%d%d", &n, &m) != EOF) {
    for (int i = 1; i <= n; i++)
      scanf("%I64d%I64d", &islands[i].M, &islands[i].MM), islands[i].id = i;
    for (int i = 1; i < n; i++) {
      bridges[i].M = islands[i + 1].M - islands[i].MM;
      bridges[i].MM = islands[i + 1].MM - islands[i].M;
      bridges[i].id = i;
    }
    sort(bridges + 1, bridges + n, cmp);
    for (int i = 1; i <= m; i++) {
      scanf("%I64d", &x);
      a[i] = AA(x, i);
    }
    sort(a + 1, a + m + 1);
    int j = 1;
    int cut = 0;
    for (int i = 1; i <= m; i++) {
      while (j < n && bridges[j].M <= a[i].x) {
        Q.push(node(bridges[j].MM, bridges[j].M, bridges[j].id));
        j++;
      }
      if (!Q.empty() && Q.top().M >= a[i].x) {
        ans[Q.top().id] = a[i].id;
        Q.pop();
        cut++;
      }
    }
    if (cut != n - 1)
      printf("No\n");
    else {
      printf("Yes\n");
      for (int i = 1; i < n - 1; i++) printf("%d ", ans[i]);
      printf("%d\n", ans[n - 1]);
    }
  }
  return 0;
}
