#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
using vi = vector<int>;
using vll = vector<ll>;
struct Event {
  ll x;
  int type;
  int i;
};
bool operator<(Event lhs, Event rhs) {
  if (lhs.x != rhs.x) return lhs.x < rhs.x;
  if (lhs.type != rhs.type) return lhs.type < rhs.type;
  return lhs.i < rhs.i;
}
const int N = 200200;
ll L[N], R[N];
ll lo[N], hi[N];
int main() {
  ios::sync_with_stdio(false);
  int n, m;
  cin >> n >> m;
  for (int i = 0; i < int(n); ++i) cin >> L[i] >> R[i];
  vector<Event> q;
  for (int i = 0; i < int(m); ++i) {
    ll len;
    cin >> len;
    q.push_back({len, 1, i + 1});
  }
  for (int i = 0; i + 1 < n; ++i) {
    lo[i] = L[i + 1] - R[i];
    hi[i] = R[i + 1] - L[i];
    q.push_back(Event{lo[i], 0, i});
    q.push_back(Event{hi[i], 2, i});
  }
  sort((q).begin(), (q).end());
  set<Event> s;
  vi ans(n - 1);
  for (Event e : q) {
    if (e.type == 0) {
      Event end{hi[e.i], 2, e.i};
      s.insert(end);
    } else if (e.type == 2) {
      if (s.find(e) != s.end()) return cout << "No\n", 0;
    } else {
      if (s.empty()) continue;
      Event f = *s.begin();
      assert(ans[f.i] == 0);
      ans[f.i] = e.i;
      s.erase(s.begin());
    }
  }
  if (!s.empty()) return cout << "No\n", 0;
  cout << "Yes\n";
  for (int i = 0; i < n - 1; ++i) cout << ans[i] << " \n"[i + 2 == n];
}
