#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1.5e5 + 5, mod = 998244353;
inline long long pw(long long a, long long b) {
  long long ret = 1;
  long long mul = a;
  while (b > 0) {
    if (b & 1) ret = (ret * mul) % mod;
    mul = (mul * mul) % mod;
    b /= 2;
  }
  return ret;
}
long long to_int(string s) {
  long long ret = 0;
  for (int(i) = (0); (i) < (s.size()); (i)++) {
    ret += pw(10, s.size() - i - 1) * (long long)(s[i] - '0');
  }
  return ret;
}
bool cmp(pair<pair<long long, long long>, long long> a,
         pair<pair<long long, long long>, long long> b) {
  return a.first.second < b.first.second;
}
int main() {
  int n, m;
  cin >> n >> m;
  pair<pair<long long, long long>, long long> segments[n - 1];
  long long f, s;
  for (int(i) = (0); (i) < (n); (i)++) {
    long long l, r;
    cin >> l >> r;
    if (i) {
      segments[i - 1] = {{l - s, r - f}, i - 1};
    }
    f = l, s = r;
  }
  multiset<pair<long long, long long> > bridge;
  for (int(i) = (0); (i) < (m); (i)++) {
    long long l;
    cin >> l;
    bridge.insert({l, i + 1});
  }
  sort(segments, segments + n - 1, cmp);
  int ans[n - 1];
  for (int(i) = (0); (i) < (n - 1); (i)++) {
    long long l = segments[i].first.first, r = segments[i].first.second,
              idx = segments[i].second;
    pair<long long, long long> b = *(bridge.lower_bound({l, 0}));
    if (b.first <= r)
      ans[idx] = b.second, bridge.erase(bridge.find(b));
    else {
      cout << "No\n";
      return 0;
    }
  }
  cout << "Yes\n";
  for (int(i) = (0); (i) < (n - 1); (i)++) cout << ans[i] << " ";
}
