#include <bits/stdc++.h>
using namespace std;
struct Interval {
  long long left, right;
  int id;
  bool operator<(const Interval& rhs) const {
    return left < rhs.left || (rhs.left == left && right < rhs.right);
  }
  bool operator>(const Interval& rhs) const {
    return right > rhs.right || (rhs.right == right && left > rhs.left);
  }
};
int ans[500005];
int main() {
  int n, m;
  scanf("%d%d", &n, &m);
  vector<Interval> v;
  vector<pair<long long, int> > bridge;
  long long _l, _r;
  scanf("%lld%lld", &_l, &_r);
  for (int i = 0; i < n - 1; i++) {
    long long l, r;
    scanf("%lld%lld", &l, &r);
    v.push_back({l - _r, r - _l, i});
    _l = l, _r = r;
  }
  for (int i = 1; i <= m; i++) {
    long long a;
    scanf("%lld", &a);
    bridge.push_back(pair<long long, int>(a, i));
  }
  sort(v.begin(), v.end());
  sort(bridge.begin(), bridge.end());
  priority_queue<Interval, vector<Interval>, greater<Interval> > pq;
  int ptr = 0, count = 0;
  for (pair<long long, int> p : bridge) {
    if (count == n - 1) break;
    long long length = p.first;
    int id = p.second;
    while (ptr < n - 1 && v[ptr].left <= length) pq.push(v[ptr]), ptr++;
    if (pq.empty()) continue;
    Interval top = pq.top();
    pq.pop();
    if (top.right < length) {
      puts("No");
      return 0;
    }
    count++;
    ans[top.id] = id;
  }
  if (count != n - 1) {
    puts("No");
    return 0;
  }
  puts("Yes");
  for (int i = 0; i < n - 1; i++) {
    printf("%d ", ans[i]);
  }
  puts("");
}
