#include <bits/stdc++.h>
using namespace ::std;
long long a[200000][2];
long long bridge[200000];
vector<pair<long long, pair<int, int>>> tem;
int result[200000];
set<pair<long long, int>> q;
int main() {
  int n, m;
  while (cin >> n >> m) {
    for (int i = 0; i < n; i++) {
      cin >> a[i][0] >> a[i][1];
    }
    for (int j = 0; j < m; j++) {
      cin >> bridge[j];
    }
    for (int i = 0; i < n - 1; i++) {
      tem.push_back(make_pair(a[i + 1][0] - a[i][1], make_pair(-1, i)));
      tem.push_back(make_pair(a[i + 1][1] - a[i][0], make_pair(1, i)));
    }
    for (int j = 0; j < m; j++) {
      tem.push_back(make_pair(bridge[j], make_pair(0, j)));
    }
    sort(tem.begin(), tem.end());
    memset(result, -1, sizeof(result));
    for (auto ev : tem) {
      if (ev.second.first == -1) {
        q.insert(make_pair(a[ev.second.second + 1][1] - a[ev.second.second][0],
                           ev.second.second));
      } else if (ev.second.first == 1) {
        q.erase(make_pair(a[ev.second.second + 1][1] - a[ev.second.second][0],
                          ev.second.second));
      } else {
        if (!q.empty()) {
          int i = q.begin()->second;
          result[i] = ev.second.second + 1;
          q.erase(q.begin());
        }
      }
    }
    for (int i = 0; i < n - 1; i++) {
      if (result[i] == -1) {
        cout << "No" << endl;
        return 0;
      }
    }
    cout << "Yes" << endl;
    for (int i = 0; i < n - 1; i++) {
      cout << result[i] << " ";
    }
    cout << endl;
  }
  return 0;
}
