#include <bits/stdc++.h>
using namespace std;
using lint = long long;
using ulint = unsigned long long;
struct point {
  int id, type;
  lint size;
  bool operator<(point o) const {
    return size == o.size ? type < o.type : size < o.size;
  }
};
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  int n, m;
  cin >> n >> m;
  vector<pair<lint, lint>> islands;
  for (int i = 0; i < n; i++) {
    lint l, r;
    cin >> l >> r;
    islands.emplace_back(l, r);
  }
  vector<point> vec;
  vector<lint> right(n);
  for (int i = 0; i < m; i++) {
    lint x;
    cin >> x;
    vec.push_back({i + 1, 2, x});
  }
  for (int i = 1; i < n; i++) {
    vec.push_back({i, 1, islands[i].first - islands[i - 1].second});
    vec.push_back({i, 3, islands[i].second - islands[i - 1].first});
    right[i] = islands[i].second - islands[i - 1].first;
  }
  sort(vec.begin(), vec.end());
  vector<int> ans(n, -1);
  set<pair<lint, int>> open;
  for (point p : vec) {
    if (p.type == 1) {
      open.insert({right[p.id], p.id});
    } else if (p.type == 3) {
      open.erase({p.size, p.id});
    } else if (p.type == 2) {
      if (open.empty()) continue;
      ans[(*open.begin()).second] = p.id;
      open.erase(open.begin());
    }
  }
  bool ok = true;
  for (int i = 1; i < n; i++) {
    ok &= ans[i] > -1;
  }
  if (ok) {
    cout << "Yes"
         << "\n";
    for (int i = 1; i < n; i++) {
      cout << ans[i] << " ";
    }
    cout << endl;
  } else {
    cout << "No"
         << "\n";
  }
}
