#include <bits/stdc++.h>
using namespace std;
const int maxn = 2e5 + 10;
const long long mod = 1e9 + 7;
struct node {
  long long l, r, mmin, mmax;
  int id, ans;
} island[maxn];
struct Node {
  long long len;
  int id;
} bridge[maxn];
int n, m, cnt;
bool vis[maxn];
bool cmp1(node a, node b) {
  if (a.mmin == b.mmin)
    return a.mmax < b.mmax;
  else
    return a.mmin < b.mmin;
}
bool cmp2(Node a, Node b) { return a.len < b.len; }
struct cmp3 {
  bool operator()(int a, int b) { return island[a].mmax > island[b].mmax; }
};
bool cmp4(node a, node b) { return a.id < b.id; }
int BSearch(int l, int r, long long x) {
  int ret = 0;
  while (l <= r) {
    int mid = (l + r) >> 1;
    if (island[mid].mmin <= x) {
      ret = mid;
      l = mid + 1;
    } else
      r = mid - 1;
  }
  return ret;
}
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= n; i++) {
    scanf("%lld%lld", &island[i].l, &island[i].r);
    island[i].id = i;
    if (i > 1) {
      island[i - 1].mmin = island[i].l - island[i - 1].r;
      island[i - 1].mmax = island[i].r - island[i - 1].l;
    }
  }
  sort(island + 1, island + n, cmp1);
  for (int i = 1; i <= m; i++) {
    scanf("%lld", &bridge[i].len);
    bridge[i].id = i;
  }
  sort(bridge + 1, bridge + 1 + m, cmp2);
  priority_queue<int, vector<int>, cmp3> q;
  int pos = 1;
  for (int i = 1; i <= m; i++) {
    long long x = bridge[i].len;
    for (int j = pos; j < n; j++) {
      if (island[j].mmin <= x) {
        q.push(j);
        pos = j + 1;
      } else {
        pos = j;
        break;
      }
    }
    if (!q.empty()) {
      int t = q.top();
      q.pop();
      if (island[t].mmax >= x) {
        island[t].ans = bridge[i].id;
        cnt++;
      } else
        break;
    }
    if (cnt == n - 1) break;
  }
  if (cnt != n - 1)
    printf("No\n");
  else {
    printf("Yes\n");
    sort(island + 1, island + n, cmp4);
    for (int i = 1; i < n; i++) printf("%d ", island[i].ans);
    printf("\n");
  }
}
