#include <bits/stdc++.h>
using namespace std;
class llll {
 public:
  long long first;
  long long second;
  llll() {}
  llll(long long f, long long s) : first(f), second(s) {}
  friend bool operator<(const llll &l1, const llll &l2) {
    if (l1.first == l2.first)
      return l1.second < l2.second;
    else
      return l1.first < l2.first;
  }
};
llll p[222222];
pair<long long, llll> q[222222];
set<llll> r;
vector<llll> ans;
bool compare(const pair<long long, llll> &p1, const pair<long long, llll> &p2) {
  return p1.second.second < p2.second.second;
}
int main() {
  int n, m;
  scanf("%d%d", &n, &m);
  for (int i = 0; i < n; i++) {
    long long x, y;
    scanf("%I64d%I64d", &x, &y);
    p[i] = llll(x, y);
  }
  for (int i = 0; i < n - 1; i++)
    q[i] = pair<long long, llll>(
        i, llll(p[i + 1].first - p[i].second, p[i + 1].second - p[i].first));
  sort(&q[0], &q[n - 1], compare);
  for (int i = 1; i <= m; i++) {
    long long x;
    scanf("%I64d", &x);
    r.insert(llll(x, i));
  }
  for (int i = 0; i < n - 1; i++) {
    set<llll>::iterator j = r.lower_bound(llll(q[i].second.first, -1));
    if (j == r.end() || j->first > q[i].second.second) {
      printf("No\n");
      return 0;
    }
    ans.push_back(llll(q[i].first, j->second));
    r.erase(j);
  }
  sort(ans.begin(), ans.end());
  printf("Yes\n");
  for (unsigned int i = 0; i < ans.size(); i++) printf("%I64d ", ans[i].second);
  return 0;
}
