#include <bits/stdc++.h>
using namespace std;
const int maxn = 200000 + 100;
long long save[maxn][2];
long long Trange[maxn][2];
int n, m;
struct Node {
  long long num;
  int id;
  Node(long long num = 0, int id = 0) : num(num), id(id) {}
  bool operator<(const Node& rhs) const { return num < rhs.num; }
};
struct Seg {
  int L, R, id;
  Seg(int L, int R, int id) : L(L), R(R), id(id) {}
  bool operator<(const Seg& rhs) const { return R > rhs.R; }
};
Node bridge[maxn];
vector<Seg> V[maxn];
int getMin(long long num) {
  return lower_bound(bridge, bridge + m, Node(num)) - bridge;
}
int getMax(long long num) {
  return upper_bound(bridge, bridge + m, Node(num)) - bridge - 1;
}
int res[maxn];
bool solve() {
  int cur = 0;
  int cnt = 0;
  priority_queue<Seg> Q;
  while (cnt < n) {
    for (int i = 0; i < V[cur].size(); ++i) Q.push(V[cur][i]);
    if (!Q.empty()) {
      Seg temp = Q.top();
      Q.pop();
      if (cur > temp.R) return false;
      res[temp.id] = bridge[cur].id;
      cnt++;
    }
    cur++;
  }
  return true;
}
int main() {
  scanf("%d %d", &n, &m);
  for (int i = 0; i < n; ++i) {
    scanf("%lld %lld", &save[i][0], &save[i][1]);
    if (i) {
      Trange[i - 1][0] = save[i][0] - save[i - 1][1];
      Trange[i - 1][1] = save[i][1] - save[i - 1][0];
    }
  }
  for (int i = 0; i < m; ++i) {
    scanf("%lld", &bridge[i].num);
    bridge[i].id = i + 1;
  }
  sort(bridge, bridge + m);
  n--;
  bool flag = true;
  for (int i = 0; i < n; ++i) {
    int L = getMin(Trange[i][0]);
    int R = getMax(Trange[i][1]);
    if (L > R) flag = false;
    V[L].push_back(Seg(L, R, i));
  }
  if (!flag) {
    puts("No");
    return 0;
  }
  if (!solve())
    puts("No");
  else {
    puts("Yes");
    for (int i = 0; i < n; ++i)
      printf("%d%c", res[i], (i == n - 1) ? '\n' : ' ');
  }
  return 0;
}
