#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 5;
struct node {
  long long x;
  long long y;
  int id;
  bool operator<(const node &a) const { return y < a.y; }
} l[N], b[N];
struct Node {
  long long x;
  int id;
  bool operator<(const Node &a) const { return x < a.x; }
} a[N];
int ans[N];
multiset<Node> ss;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int n, m;
  cin >> n >> m;
  cin >> b[0].x >> b[0].y;
  for (int i = 1; i < n; i++) {
    cin >> b[i].x >> b[i].y;
    l[i - 1].x = b[i].x - b[i - 1].y;
    l[i - 1].y = b[i].y - b[i - 1].x;
    l[i - 1].id = i;
  }
  for (int i = 0; i < m; i++) {
    cin >> a[i].x;
    a[i].id = i + 1;
    ss.insert(a[i]);
  }
  sort(l, l + n - 1);
  for (int i = 0; i < n - 1; i++) {
    auto it = ss.lower_bound(Node{l[i].x, 0});
    if (it == ss.end()) {
      cout << "No" << endl;
      return 0;
    }
    if (it->x <= l[i].y) {
      ans[l[i].id] = it->id;
      ss.erase(it);
    } else {
      cout << "No" << endl;
      return 0;
    }
  }
  cout << "Yes" << endl;
  for (int i = 1; i < n - 1; i++) cout << ans[i] << " ";
  cout << ans[n - 1] << endl;
  return 0;
}
