#include <bits/stdc++.h>
using namespace std;
const long long lmt = 2e5 + 5;
long long n, m, ans[lmt], l[lmt], r[lmt], a[lmt];
vector<pair<long long, pair<long long, long long>>> seg;
set<pair<long long, long long>> q;
int main() {
  ios_base::sync_with_stdio(false);
  cin >> n >> m;
  for (long long i = 1; i <= n; i++) {
    cin >> l[i] >> r[i];
  }
  for (long long i = 1; i <= m; i++) {
    cin >> a[i];
  }
  for (long long i = 1; i < n; i++) {
    seg.push_back({l[i + 1] - r[i], {-1, i}});
    seg.push_back({r[i + 1] - l[i], {1, i}});
  }
  for (long long i = 1; i <= m; i++) {
    seg.push_back({a[i], {0, i}});
  }
  sort(seg.begin(), seg.end());
  for (auto x : seg) {
    if (x.second.first == -1) {
      q.insert({r[x.second.second + 1] - l[x.second.second], x.second.second});
    }
    if (x.second.first == 1) {
      q.erase({r[x.second.second + 1] - l[x.second.second], x.second.second});
    }
    if (x.second.first == 0 && q.size() > 0) {
      long long it = q.begin()->second;
      ans[it] = x.second.second;
      q.erase(q.begin());
    }
  }
  for (long long i = 1; i < n; i++) {
    if (!ans[i]) {
      cout << "No"
           << "\n";
      return 0;
    }
  }
  cout << "Yes"
       << "\n";
  for (long long i = 1; i < n; i++) {
    cout << ans[i] << " ";
  }
  cout << "\n";
}
