#include <bits/stdc++.h>
using namespace std;
struct node {
  long long x, y;
  int id;
} p[200005];
int ans[200005];
bool cmp(node a, node b) { return a.y < b.y; }
struct node1 {
  int id;
  long long w;
  friend bool operator<(node1 a, node1 b) {
    if (a.w != b.w)
      return a.w < b.w;
    else if (a.id != b.id)
      return a.id < b.id;
    else
      return false;
  }
} b[200005];
int main() {
  int n, m;
  while (~scanf("%d%d", &n, &m)) {
    long long pl, pr;
    long long cl, cr;
    scanf("%lld%lld", &pl, &pr);
    for (int i = 1; i < n; i++) {
      scanf("%lld%lld", &cl, &cr);
      p[i - 1].x = (cl - pr);
      p[i - 1].y = (cr - pl);
      p[i - 1].id = i;
      pl = cl;
      pr = cr;
    }
    sort(p, p + (n - 1), cmp);
    for (int i = 0; i < m; i++) {
      scanf("%lld", &b[i].w);
      b[i].id = i + 1;
    }
    sort(b, b + m);
    set<node1> s;
    int id = 0;
    set<node1>::iterator it, it1;
    int f = 1;
    for (int i = 0; i < n - 1; i++) {
      long long lim = p[i].y;
      while (id < m && b[id].w <= lim) {
        s.insert(b[id]);
        id++;
      }
      node1 tp;
      tp.w = p[i].x;
      tp.id = 0;
      s.insert(tp);
      it = s.find(tp);
      it++;
      if (it == s.end()) {
        f = 0;
        break;
      }
      ans[p[i].id] = it->id;
      s.erase(it);
      s.erase(tp);
    }
    if (f == 0) {
      printf("No\n");
      continue;
    } else {
      printf("Yes\n");
      for (int i = 1; i < n; i++) {
        printf("%d ", ans[i]);
      }
      printf("\n");
    }
  }
}
