#include <bits/stdc++.h>
using namespace std;
int n, m;
long long l[200010], r[200010];
vector<pair<long long, pair<int, int> > > v;
int ans[200010];
set<pair<long long, int> > s;
int main() {
  scanf("%d%d", &n, &m);
  long long l_tmp, r_tmp;
  scanf("%I64d%I64d", &l_tmp, &r_tmp);
  for (int i = 1; i < n; i++) {
    long long x, y;
    scanf("%I64d%I64d", &x, &y);
    l[i] = x - r_tmp, r[i] = y - l_tmp;
    l_tmp = x, r_tmp = y;
    v.push_back(make_pair(l[i], make_pair(-1, i)));
    v.push_back(make_pair(r[i], make_pair(1, i)));
  }
  for (int i = 1; i <= m; i++) {
    long long x;
    scanf("%I64d", &x);
    v.push_back(make_pair(x, make_pair(0, i)));
  }
  sort(v.begin(), v.end());
  fill(ans + 1, ans + n, -1);
  for (auto p : v) {
    if (p.second.first == -1)
      s.insert(make_pair(r[p.second.second], p.second.second));
    else if (p.second.first == 1)
      s.erase(make_pair(r[p.second.second], p.second.second));
    else if (s.size()) {
      int id = s.begin()->second;
      ans[id] = p.second.second;
      s.erase(s.begin());
    }
  }
  for (int i = 1; i < n; i++)
    if (ans[i] == -1) return 0 * puts("No");
  puts("Yes");
  for (int i = 1; i < n; i++) printf("%d ", ans[i]);
  return 0;
}
