#include <bits/stdc++.h>
using namespace std;
class Interval {
 public:
  long long start;
  long long end;
  int index;
  Interval(int index, long long start, long long end) {
    this->index = index;
    this->start = start;
    this->end = end;
  }
};
bool operator<(const Interval& a, const Interval& b) { return (a.end < b.end); }
int main() {
  int n, m;
  scanf("%d %d", &n, &m);
  vector<pair<long long, long long> > islands;
  multimap<long long, int> bridges;
  for (int i = 0; i < n; i++) {
    long long left, right;
    scanf("%I64d %I64d", &left, &right);
    islands.push_back(make_pair(left, right));
  }
  for (int i = 0; i < m; i++) {
    long long length;
    scanf("%I64d", &length);
    bridges.insert(make_pair(length, i));
  }
  vector<Interval> gaps;
  for (int i = 0; i < n - 1; i++)
    gaps.emplace_back(i, islands[i + 1].first - islands[i].second,
                      islands[i + 1].second - islands[i].first);
  sort(gaps.begin(), gaps.end());
  bool possible = 1;
  assert(gaps.size() == n - 1);
  vector<int> res(n - 1);
  for (auto gap : gaps) {
    auto left_most = bridges.lower_bound(gap.start);
    if (left_most == bridges.end() || (*left_most).first > gap.end) {
      possible = 0;
      break;
    } else {
      assert(gap.index < n);
      res[gap.index] = (*left_most).second;
      assert(res[gap.index] < m);
      bridges.erase(left_most);
    }
  }
  if (possible) {
    printf("Yes\n");
    for (auto brdg : res) printf("%d ", brdg + 1);
  } else {
    printf("No");
  }
  return 0;
}
