#include <bits/stdc++.h>
using namespace std;
const long long int mod = 1e9 + 10;
const long long int mod1 = 1e9 + 9;
const long long int N = 2005;
const long long int maxn = 1e6 + 55;
double pie = 3.1415926535;
vector<pair<pair<long long int, long long int>, long long int> > line;
multiset<pair<long long int, long long int> > point;
long long int l[maxn], r[maxn], ans[maxn];
int main() {
  long long int n, m, i, x;
  cin >> n >> m;
  for (i = 1; i <= n; i++) {
    cin >> l[i] >> r[i];
    if (i > 1) {
      line.push_back({{r[i] - l[i - 1], l[i] - r[i - 1]}, i});
    }
  }
  sort(line.begin(), line.end());
  for (i = 1; i <= m; i++) {
    cin >> x;
    point.insert({x, i});
  }
  for (i = 0; i < n - 1; i++) {
    long long int lim1 = line[i].first.first;
    long long int lim2 = line[i].first.second;
    long long int idx = line[i].second;
    auto it = point.lower_bound({lim2, 0});
    if (it == point.end() || it->first > lim1) {
      cout << "No" << endl;
      exit(0);
    }
    ans[idx] = it->second;
    point.erase(it);
  }
  cout << "Yes" << endl;
  for (i = 2; i <= n; i++) cout << ans[i] << " ";
}
