#include <bits/stdc++.h>
using namespace std;
struct island {
  long long l, r;
} a[200005];
struct bridge {
  int ind;
  long long len;
};
bool operator<(bridge a, bridge b) {
  if (a.len != b.len)
    return a.len < b.len;
  else
    return a.ind < b.ind;
}
struct node {
  int ind;
  long long ma, len;
};
bool operator<(node a, node b) {
  if (a.ma != b.ma)
    return a.ma < b.ma;
  else if (a.len != b.len)
    return a.len < b.len;
  else
    return a.ind < b.ind;
}
set<bridge> s;
set<bridge>::iterator it, it1;
int an[200005];
vector<node> v;
int main() {
  int n, m;
  scanf("%d %d", &n, &m);
  for (int i = 0; i < n; i++) scanf("%lld %lld", &a[i].l, &a[i].r);
  bridge temp;
  for (int i = 0; i < m; i++) {
    scanf("%lld", &temp.len);
    temp.ind = i + 1;
    s.insert(temp);
  }
  node t;
  for (int i = 0; i < n - 1; i++) {
    t.ind = i;
    t.len = a[i + 1].l - a[i].r;
    t.ma = a[i + 1].r - a[i].l;
    v.push_back(t);
  }
  sort(v.begin(), v.end());
  temp.ind = -1;
  long long ma;
  bool ans = 0;
  for (int i = 0; i < n - 1; i++) {
    temp.len = v[i].len;
    ma = v[i].ma;
    s.insert(temp);
    it = s.find(temp);
    it++;
    if (it != s.end()) {
      if (it->len > ma) {
        ans = 1;
        break;
      }
      an[v[i].ind] = it->ind;
      s.erase(it);
      it1 = s.find(temp);
      s.erase(it1);
    } else {
      ans = 1;
      break;
    }
  }
  if (ans)
    printf("No");
  else {
    printf("Yes\n");
    for (int i = 0; i < n - 1; i++) {
      printf("%d ", an[i]);
    }
  }
  return 0;
}
