#include <bits/stdc++.h>
using namespace std;
void solve() {
  int n, m;
  cin >> n >> m;
  if (n - 1 > m) {
    cout << "No" << endl;
    return;
  }
  vector<long long> l(n), r(n), a(m);
  for (int i = 0; i < n; ++i) {
    cin >> l[i] >> r[i];
  }
  for (int i = 0; i < m; ++i) {
    cin >> a[i];
  }
  vector<pair<long long, pair<int, int>>> v;
  for (int i = 0; i < n - 1; ++i) {
    v.push_back({l[i + 1] - r[i], {-1, i}});
    v.push_back({r[i + 1] - l[i], {+1, i}});
  }
  for (int i = 0; i < m; ++i) {
    v.push_back({a[i], {0, i}});
  }
  sort(v.begin(), v.end());
  vector<int> ans(n - 1, -1);
  set<pair<long long, int>> s;
  for (auto p : v) {
    if (p.second.first == -1) {
      s.insert({r[p.second.second + 1] - l[p.second.second], p.second.second});
    } else if (p.second.first == +1) {
      s.erase({r[p.second.second + 1] - l[p.second.second], p.second.second});
    } else if (!s.empty()) {
      auto i = s.begin();
      ans[i->second] = p.second.second;
      s.erase(i);
    }
  }
  for (int i = 0; i < n - 1; ++i) {
    if (ans[i] == -1) {
      cout << "No" << endl;
      return;
    }
  }
  cout << "Yes" << endl;
  for (int i = 0; i < n - 1; ++i) {
    if (i) {
      cout << " ";
    }
    cout << ans[i] + 1;
  }
  cout << endl;
}
void init() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
}
int main() {
  init();
  solve();
  return 0;
}
