#include <bits/stdc++.h>
using namespace std;
int n, m;
struct gap {
  unsigned long long min, max;
  int id;
};
struct bridge {
  unsigned long long len;
  int id;
};
gap gaps[200100];
bridge bridges[200100];
int ans[200100];
bool bridge_comp(bridge a, bridge b) { return a.len < b.len; }
bool gap_comp(gap a, gap b) { return a.min < b.min; }
class GapA {
 public:
  unsigned long long max, min;
  int id;
  GapA(gap g) {
    this->min = g.min;
    this->max = g.max;
    this->id = g.id;
  }
  bool operator<(const GapA &other) const { return other.max < this->max; }
};
set<unsigned long long> steps;
priority_queue<GapA> pq;
int main() {
  cin >> n >> m;
  unsigned long long l, lold, r, rold;
  cin >> lold >> rold;
  for (int i = 0; i < n - 1; i++) {
    cin >> l >> r;
    gaps[i].min = l - rold;
    gaps[i].max = r - lold;
    gaps[i].id = i + 1;
    steps.insert(gaps[i].min);
    steps.insert(gaps[i].max);
    lold = l;
    rold = r;
  }
  for (int i = 0; i < m; i++) {
    cin >> bridges[i].len;
    steps.insert(bridges[i].len);
    bridges[i].id = i + 1;
  }
  sort(bridges, bridges + m, bridge_comp);
  sort(gaps, gaps + n - 1, gap_comp);
  int bpos = 0;
  int pos = 0;
  for (set<unsigned long long>::iterator it = steps.begin(); it != steps.end();
       ++it) {
    while (pos < n - 1 && *it == gaps[pos].min) {
      pq.push(GapA(gaps[pos]));
      pos++;
    }
    while (bpos < m && *it == bridges[bpos].len) {
      if (!pq.empty() && *it <= pq.top().max) {
        ans[pq.top().id] = bridges[bpos].id;
        pq.pop();
      }
      bpos++;
    }
    if (!pq.empty() && *it >= pq.top().max) {
      cout << "No\n";
      return 0;
    }
  }
  cout << "Yes\n";
  for (int i = 1; i < n - 1; i++) cout << ans[i] << ' ';
  cout << ans[n - 1] << '\n';
  return 0;
}
