#include <bits/stdc++.h>
using namespace std;
const double pi = acos(-1.0);
const double eps = 1e-11;
const long long MOD = 1000000007;
template <class T>
inline T sqr(T x) {
  return x * x;
}
template <class T>
void setbit(T& v, int position) {
  v |= (T)1 << position;
}
template <class T>
void unsetbit(T& v, int position) {
  v &= ~((T)1 << position);
}
template <class T>
void togglebit(T& v, int position) {
  v ^= (T)1 << position;
}
template <class T>
bool isbit(T v, int position) {
  return (v & ((T)1 << position)) != 0;
}
template <class T>
inline int countbit(T n) {
  return (n == 0) ? 0 : (1 + countbit(n & (n - 1)));
}
string ReadToEndLine(istream& s) {
  string sLine;
  getline(s, sLine);
  return sLine;
}
char gStr[1024];
struct Runner {
  Runner(istream& in, ostream& out) : mIn(in), mOut(out) {}
  void Run();
  istream& mIn;
  ostream& mOut;
};
void Runner::Run() {
  int N, M;
  mIn >> N >> M;
  vector<pair<long long, long long> > I(N);
  for (int i = (0); i < ((int)(I.size())); i++)
    mIn >> I[i].first >> I[i].second;
  vector<pair<long long, int> > B(M);
  for (int i = (0); i < ((int)(B.size())); i++) {
    mIn >> B[i].first;
    B[i].second = i;
  }
  vector<pair<long long, pair<int, int> > > T;
  for (int i = (0); i < (N - 1); i++) {
    T.push_back(make_pair(I[i + 1].first - I[i].second, make_pair(-1, i)));
    T.push_back(make_pair(I[i + 1].second - I[i].first, make_pair(1, i)));
  }
  for (int i = (0); i < ((int)(B.size())); i++) {
    T.push_back(make_pair(B[i].first, make_pair(0, i)));
  }
  sort(T.begin(), T.end());
  vector<int> R(N - 1, -1);
  set<pair<long long, int> > Cands;
  for (int i = (0); i < ((int)(T.size())); i++) {
    int index = T[i].second.second;
    if (T[i].second.first == -1)
      Cands.insert(make_pair(I[index + 1].second - I[index].first, index));
    else if (T[i].second.first == 1)
      Cands.erase(make_pair(I[index + 1].second - I[index].first, index));
    else if (!Cands.empty()) {
      R[Cands.begin()->second] = index + 1;
      Cands.erase(Cands.begin());
    }
  }
  for (int i = (0); i < ((int)(R.size())); i++) {
    if (R[i] < 0) {
      mOut << "No" << endl;
      return;
    }
  }
  mOut << "Yes" << endl;
  for (int i = (0); i < ((int)(R.size())); i++) {
    mOut << R[i] << " ";
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  Runner runner(cin, cout);
  runner.Run();
  return 0;
}
