#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 9;
int n, m;
vector<pair<pair<long long int, long long int>, int>> v;
vector<pair<long long int, long long int>> a;
vector<pair<long long int, int>> c;
set<pair<long long int, int>> s;
int ans[N];
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cin >> n >> m;
  for (int i = 0; i < n; i++) {
    long long int x, y;
    cin >> x >> y;
    a.push_back({x, y});
  }
  for (int i = 0; i < n - 1; i++) {
    long long int mn = a[i + 1].first - a[i].second;
    long long int mx = a[i + 1].second - a[i].first;
    v.push_back({{mn, mx}, i});
  }
  for (int i = 1; i <= m; i++) {
    long long int x;
    cin >> x;
    c.push_back({x, i});
  }
  sort(v.begin(), v.end());
  sort(c.begin(), c.end());
  int cur = 0;
  for (int i = 0; i < m; i++) {
    while (cur < n - 1 && v[cur].first.first <= c[i].first) {
      s.insert({v[cur].first.second, v[cur].second});
      cur++;
    }
    auto it = s.lower_bound({c[i].first, -1});
    auto p = *s.lower_bound({c[i].first, -1});
    if (it != s.end()) {
      ans[p.second] = c[i].second;
      s.erase(s.find(p));
    }
  }
  if (s.size() > 0 || cur < n - 1) {
    cout << "No" << '\n';
    return 0;
  }
  cout << "Yes" << '\n';
  for (int i = 0; i < n - 1; i++) {
    cout << ans[i] << " ";
  }
}
