#include <bits/stdc++.h>
using namespace std;
struct interval {
  long long l, r, id;
  interval() {}
  interval(long long l, long long r, int id) : l(l), r(r), id(id) {}
};
bool operator<(const interval& a, const interval& b) { return a.l < b.l; }
bool operator>(const interval& a, const interval& b) { return a.r > b.r; }
ostream& operator<<(ostream& out, const interval& inter) {
  out << inter.l << " " << inter.r << " " << inter.id << endl;
  return out;
}
ostream& operator<<(ostream& out, const pair<long long, long long>& p) {
  out << '(' << p.first << ", " << p.second << ")  ";
  return out;
}
template <class T>
ostream& operator<<(ostream& out, const vector<T>& v) {
  out << "Yes\n";
  for (T it : v) out << it << " ";
  out << endl;
  return out;
}
struct lt {
  bool operator()(const interval& a, const interval& b) { return a > b; }
};
vector<interval> vp;
vector<pair<long long, long long>> bridges;
vector<int> ans;
int main() {
  long long n, m;
  cin >> n >> m;
  ans.resize(n);
  long long prev_l, prev_r;
  cin >> prev_l >> prev_r;
  for (int i = 1; i < n; ++i) {
    long long l, r;
    cin >> l >> r;
    vp.push_back(interval(l - prev_r, r - prev_l, i));
    prev_l = l;
    prev_r = r;
  }
  sort(vp.begin(), vp.end());
  bridges.resize(m);
  for (int i = 0; i < m; ++i) {
    cin >> bridges[i].first;
    bridges[i].second = i + 1;
  }
  sort(bridges.begin(), bridges.end());
  long long lb = 0, lvp = 0;
  priority_queue<interval, vector<interval>, lt> pq;
  while (lb < m) {
    while (lvp + 1 < n && vp[lvp].l <= bridges[lb].first) {
      pq.push(vp[lvp]);
      ++lvp;
    }
    if (!pq.empty() && bridges[lb].first > pq.top().r) {
      cout << "No\n";
      return 0;
    }
    if (!pq.empty()) {
      ans[pq.top().id] = bridges[lb].second;
      pq.pop();
    }
    ++lb;
  }
  ans.erase(ans.begin());
  if (!pq.empty() || lvp + 1 < n)
    cout << "No\n";
  else
    cout << ans;
  return 0;
}
