#include <bits/stdc++.h>
using namespace std;
long long L[200005];
long long R[200005];
int ans[200005];
struct node {
  long long fs;
  long long sc;
  int idx;
  node(long long fs, long long sc, int idx) {
    this->fs = fs;
    this->sc = sc;
    this->idx = idx;
  }
};
bool cmp(node p1, node p2) {
  if (p1.sc != p2.sc) return p1.sc < p2.sc;
  return p1.fs < p2.fs;
}
int main() {
  int n, m;
  long long x;
  set<pair<long long, int> > bridges;
  set<pair<long long, int> >::iterator it;
  vector<node> islands;
  cin >> n >> m;
  for (int i = 0; i < n; i++) cin >> L[i] >> R[i];
  for (int i = 0; i < m; i++) {
    cin >> x;
    bridges.insert(make_pair(x, i));
  }
  if (m < n - 1) {
    puts("No");
    return 0;
  }
  for (int i = 0; i < n - 1; i++)
    islands.push_back(node(L[i + 1] - R[i], R[i + 1] - L[i], i));
  sort(islands.begin(), islands.end(), cmp);
  for (int i = 0; i < islands.size(); i++) {
    it = bridges.lower_bound(make_pair(islands[i].fs, -1));
    if (it == bridges.end() || it->first > islands[i].sc) {
      puts("No");
      return 0;
    } else {
      ans[islands[i].idx] = it->second;
      bridges.erase(it);
    }
  }
  puts("Yes");
  for (int i = 0; i < islands.size(); i++) cout << ans[i] + 1 << " ";
  return 0;
}
