#include <bits/stdc++.h>
using namespace std;
const int MAXN = 200005;
struct REQ {
  int id;
  long long a, b;
} req[MAXN];
struct RES {
  int id;
  long long v;
  bool operator<(const RES& rhs) const {
    if (v != rhs.v)
      return v < rhs.v;
    else
      return id < rhs.id;
  }
} arr[MAXN];
int arrange[MAXN];
int N, M;
bool coml(const REQ& lhs, const REQ& rhs) {
  if (lhs.a != rhs.a)
    return lhs.a < rhs.a;
  else if (lhs.b != rhs.b)
    return lhs.b < rhs.b;
  else
    return lhs.id < rhs.id;
};
struct COMR {
  bool operator()(const REQ& lhs, const REQ& rhs) const {
    if (lhs.b != rhs.b)
      return lhs.b < rhs.b;
    else if (lhs.a != rhs.a)
      return lhs.a < rhs.a;
    else
      return lhs.id < rhs.id;
  };
};
set<REQ, COMR> mp;
int main() {
  long long l, r, ln, rn;
  int i, j;
  int ans = 0;
  scanf("%d%d", &N, &M);
  scanf("%I64d%I64d", &l, &r);
  for (i = 1; i < N; i++) {
    scanf("%I64d%I64d", &ln, &rn);
    req[i - 1].a = ln - r;
    req[i - 1].b = rn - l;
    req[i - 1].id = i;
    l = ln;
    r = rn;
  }
  N--;
  sort(req, req + N, coml);
  for (i = 0; i < M; i++) {
    scanf("%I64d", &arr[i].v);
    arr[i].id = i + 1;
  }
  sort(arr, arr + M);
  j = 0;
  for (i = 0; i < M; i++) {
    for (; j < N && req[j].a <= arr[i].v; j++) {
      mp.insert(req[j]);
    }
    if (mp.size() == 0) continue;
    const REQ& it = *mp.begin();
    if (it.b < arr[i].v) {
      break;
    }
    arrange[it.id] = arr[i].id;
    ans++;
    mp.erase(mp.begin());
  }
  if (ans == N) {
    puts("Yes");
    for (i = 1; i <= N; i++) printf("%d ", arrange[i]);
  } else {
    puts("No");
  }
  return 0;
}
