#include <bits/stdc++.h>
using namespace std;
const int MAXMN = 2 * 100005;
struct tt {
  long long l, r, id, type;
} b[2 * MAXMN];
long long n, m, res[MAXMN];
bool cmp(const tt& a, const tt& b) {
  if (a.l == b.l)
    return a.type < b.type;
  else
    return a.l < b.l;
}
struct cmpp {
  bool operator()(const pair<long long, long long>& a,
                  const pair<long long, long long>& b) {
    return a.first > b.first;
  }
};
pair<long long, long long> a[MAXMN];
priority_queue<pair<long long, long long>, vector<pair<long long, long long> >,
               cmpp>
    qu;
int main() {
  cin >> n >> m;
  for (int i = 1; i <= n; i++) cin >> a[i].first >> a[i].second, res[i] = 0;
  for (int i = 1; i < n; i++)
    b[i] = tt{a[i + 1].first - a[i].second, a[i + 1].second - a[i].first, i, 0};
  long long x;
  for (int i = 1; i <= m; i++) cin >> x, b[i + n - 1] = tt{x, x, i, 1};
  sort(b + 1, b + m + n, cmp);
  for (int i = 1; i < m + n; i++)
    if (b[i].type == 0)
      qu.push(pair<long long, long long>(b[i].r, b[i].id));
    else if (qu.size()) {
      pair<long long, long long> T = qu.top();
      qu.pop();
      if (T.first >= b[i].r) res[T.second] = b[i].id;
    }
  for (int i = 1; i < n; i++)
    if (res[i] == 0) {
      cout << "No";
      return 0;
    }
  cout << "Yes\n";
  for (int i = 1; i < n; i++) cout << res[i] << " ";
  return 0;
}
