#include <bits/stdc++.h>
using namespace std;
vector<pair<pair<long long, long long>, long long> > v;
vector<pair<long long, long long> > p;
set<pair<long long, long long> > s;
set<pair<long long, long long> >::iterator it;
long long l[200000], r[200000], ans[200000];
int main() {
  long long n, m, i, j, k;
  cin >> n >> m;
  for (i = 0; i < n; i++) cin >> l[i] >> r[i];
  for (i = 0; i < m; i++) {
    cin >> k;
    p.push_back(make_pair(k, i));
  }
  n--;
  for (i = 0; i < n; i++)
    v.push_back(make_pair(make_pair(l[i + 1] - r[i], r[i + 1] - l[i]), i));
  sort(v.begin(), v.end());
  sort(p.begin(), p.end());
  for (i = 0, j = 0; j < p.size(); j++) {
    for (; i < v.size(); i++) {
      if (v[i].first.first <= p[j].first && p[j].first <= v[i].first.second)
        s.insert(make_pair(v[i].first.second, v[i].second));
      else
        break;
    }
    if (!s.empty()) it = s.lower_bound(make_pair(p[j].first, -1));
    if (!s.empty() && it == s.end())
      break;
    else {
      if (!s.empty()) {
        ans[(*it).second] = p[j].second;
        s.erase(it);
      } else
        ;
    }
  }
  if (!s.empty() || i != v.size())
    printf("No\n");
  else {
    printf("Yes\n");
    for (i = 0; i < v.size(); i++) cout << ans[i] + 1 << ' ';
    printf("\n");
  }
  return 0;
}
