#include <bits/stdc++.h>
using namespace std;
const int N = 500050;
const int inf = 0x3f3f3f3f;
const long long mod = 998244353LL;
clock_t TIME_START, TIME_END;
void program_end() {}
int n, m;
struct island {
  long long l, r;
  bool operator<(const island &X) const { return l < X.l; }
} a[N];
struct bridge {
  long long len;
  int id;
  bool operator<(const bridge &X) const { return len < X.len; }
} b[N];
struct Tmp {
  long long L, R;
  int id;
  friend bool operator<(const Tmp &X, const Tmp &Y) { return X.R > Y.R; }
} p[N];
bool cmp(const Tmp &X, const Tmp &Y) {
  return X.L < Y.L || (X.L == Y.L && X.R < Y.R);
}
int ans[N];
priority_queue<Tmp> q;
void solve() {
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= n; ++i) scanf("%lld%lld", &a[i].l, &a[i].r);
  sort(a + 1, a + n + 1);
  for (int i = 1; i <= m; ++i) {
    scanf("%lld", &b[i].len);
    b[i].id = i;
  }
  sort(b + 1, b + m + 1);
  for (int i = 1; i < n; ++i)
    p[i] = {a[i + 1].l - a[i].r, a[i + 1].r - a[i].l, i};
  sort(p + 1, p + n, cmp);
  int las = 1;
  int cnt = 0;
  for (int i = 1; i <= m; ++i) {
    if (cnt == n - 1) break;
    while (las < n && p[las].L <= b[i].len && p[las].R >= b[i].len)
      q.push(p[las++]);
    if (q.empty()) continue;
    Tmp u = q.top();
    q.pop();
    if (b[i].len <= u.R)
      ++cnt, ans[u.id] = b[i].id;
    else
      return puts("No"), void();
  }
  if (cnt != n - 1) return puts("No"), void();
  puts("Yes");
  for (int i = 1; i < n; ++i) printf("%d ", ans[i]);
}
int main() {
  TIME_START = clock();
  int Test = 1;
  while (Test--) solve();
  TIME_END = clock();
  program_end();
  return 0;
}
