#include <bits/stdc++.h>
using namespace std;
struct TE {
  long long v, ins;
  int ty, id;
  bool operator<(const TE& t) const {
    return (v < t.v) || (v == t.v && ty > t.ty);
  }
};
const int MAX_N = 100010 << 1;
int In, Pn, En;
pair<long long, long long> I[MAX_N];
long long P[MAX_N];
int Pair[MAX_N];
TE E[MAX_N << 2];
set<pair<long long, long long> > S;
inline void Main() {
  scanf("%d%d", &In, &Pn);
  for (int i = 1; i <= In; i++)
    scanf(
        "%lld"
        "%lld",
        &I[i].first, &I[i].second);
  for (int i = 1; i <= Pn; i++) scanf("%lld", &P[i]);
  for (int i = 1; i <= Pn; i++) E[++En] = (TE){P[i], -1, 0, i};
  for (int i = 1; i < In; i++)
    E[++En] =
        (TE){I[i + 1].first - I[i].second, I[i + 1].second - I[i].first, 1, i},
    E[++En] =
        (TE){I[i + 1].second - I[i].first, I[i + 1].second - I[i].first, -1, i};
  sort(E + 1, E + 1 + En);
  for (int i = 1; i <= En; i++) {
    TE& e = E[i];
    if (e.ty == 1)
      S.insert(make_pair(e.ins, e.id));
    else if (e.ty == -1)
      S.erase(make_pair(e.ins, e.id));
    else if (!S.empty()) {
      int idx = S.begin()->second;
      Pair[idx] = e.id;
      S.erase(S.begin());
    }
  }
  for (int i = 1; i < In; i++)
    if (!Pair[i]) {
      puts("No");
      exit(0);
    }
  puts("Yes");
  for (int i = 1; i < In; i++) printf("%d%c", Pair[i], " \n"[i == In - 1]);
}
int main() {
  Main();
  return 0;
}
