#include <bits/stdc++.h>
using namespace std;
struct node {
  long long x, y;
  int id;
} s[200005];
struct Bridge {
  long long x;
  int id;
  bool operator<(const Bridge &A) const {
    if (x != A.x) return x < A.x;
    return id < A.id;
  }
} bg[200005];
set<Bridge> st;
set<Bridge>::iterator it;
bool cmp(node A, node B) {
  if (A.y != B.y) return A.y < B.y;
  return A.x < B.x;
}
int ans[200005];
int main() {
  int n, m;
  int i, j, k;
  long long l0, r0, l1, r1;
  scanf("%d %d", &n, &m);
  if (m < n - 1) {
    puts("No");
    return 0;
  }
  cin >> l0 >> r0;
  for (i = 0; i < n - 1; i++) {
    cin >> l1 >> r1;
    s[i].id = i + 1;
    s[i].x = l1 - r0;
    s[i].y = r1 - l0;
    l0 = l1, r0 = r1;
  }
  sort(s, s + n - 1, cmp);
  for (i = 0; i < m; i++) {
    cin >> bg[i].x;
    bg[i].id = i + 1;
  }
  sort(bg, bg + m);
  for (i = 0, j = 0; i < n - 1; i++) {
    while (j < m && bg[j].x <= s[i].y) {
      st.insert(bg[j]);
      j++;
    }
    Bridge tmp;
    tmp.x = s[i].x, tmp.id = -1;
    it = st.lower_bound(tmp);
    if (it == st.end()) {
      puts("No");
      return 0;
    }
    ans[s[i].id] = (*it).id;
    st.erase(it);
  }
  puts("Yes");
  for (i = 1; i < n; i++) printf("%d ", ans[i]);
  puts("");
  return 0;
}
