#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const int MAXN = 2e5 + 11;
struct XJB {
  ll l, r;
  int id;
  XJB() {}
  XJB(ll l, ll r, ll id) : l(l), r(r), id(id) {}
  bool operator<(const XJB &rhs) const { return r > rhs.r; }
} a[MAXN];
bool cmp(XJB &a, XJB &b) { return a.l < b.l; }
ll lo[MAXN], hi[MAXN];
struct XJBB {
  ll val;
  int id;
  bool operator<(const XJBB &rhs) const { return val < rhs.val; }
} b[MAXN];
priority_queue<XJB> que;
int ans[MAXN], n, m;
int main() {
  while (cin >> n >> m) {
    for (int i = 1; i <= n; i++) {
      cin >> lo[i] >> hi[i];
    }
    for (int i = 1; i < n; i++) {
      a[i].l = lo[i + 1] - hi[i];
      a[i].r = hi[i + 1] - lo[i];
      a[i].id = i;
    }
    for (int i = 1; i <= m; i++) {
      cin >> b[i].val;
      b[i].id = i;
    }
    sort(a + 1, a + n, cmp);
    sort(b + 1, b + 1 + m);
    bool flag = 0;
    for (int i = 1, j = 1; i <= m; i++) {
      while (j < n && a[j].l <= b[i].val) {
        que.push(XJB(a[j].l, a[j].r, a[j].id));
        j++;
      }
      while (!que.empty() && que.top().r < b[i].val) que.pop();
      if (!que.empty()) {
        XJB q = que.top();
        que.pop();
        ans[q.id] = b[i].id;
      }
    }
    for (int i = 1; i < n; i++) {
      if (ans[i] == 0) flag = 1;
    }
    if (flag) {
      cout << "No" << endl;
    } else {
      cout << "Yes" << endl;
      for (int i = 1; i < n; i++) {
        if (i == n - 1)
          cout << ans[i] << endl;
        else
          cout << ans[i] << " ";
      }
    }
    memset(ans, 0, sizeof ans);
  }
}
