#include <bits/stdc++.h>
using namespace std;
const double pi = acos(-1);
int cmp(double a, double b = 0) {
  if (fabs(a - b) < 1e-8) return 0;
  if (a < b) return -1;
  return 1;
}
struct pt {
  double x, y;
  explicit pt(double x = 0, double y = 0) : x(x), y(y) {}
  pt operator+(pt q) { return pt(x + q.x, y + q.y); }
  pt operator-(pt q) { return pt(x - q.x, y - q.y); }
  pt operator*(double t) { return pt(x * t, y * t); }
  pt operator/(double t) { return pt(x / t, y / t); }
  double operator*(pt q) { return x * q.x + y * q.y; }
  double operator%(pt q) { return x * q.y - y * q.x; }
  int cmp(pt q) const {
    if (int t = ::cmp(x, q.x)) return t;
    return ::cmp(y, q.y);
  }
  bool operator==(pt q) const { return cmp(q) == 0; }
  bool operator!=(pt q) const { return cmp(q) != 0; }
  bool operator<(pt q) const { return cmp(q) < 0; }
};
ostream& operator<<(ostream& os, const pt& p) {
  os << "(" << p.x << ", " << p.y << ")";
  return os;
}
struct reta {
  pt ini, fim;
  reta() {}
  reta(pt ini, pt fim) : ini(ini), fim(fim) {}
};
struct eq_reta {
  double A, B, C;
  void init(reta p) {
    pt aux = p.ini - p.fim;
    A = aux.y;
    B = -aux.x;
    C = -A * p.ini.x - B * p.ini.y;
  }
  eq_reta(reta p) { init(p); }
};
pt normal(pt v) { return pt(-v.y, v.x); }
double norma(pt v) { return hypot(v.x, v.y); }
pt versor(pt v) { return v / norma(v); }
double anglex(pt v) { return atan2(v.y, v.x); }
double angle(pt v1, pt v2) { return atan2(v1 % v2, v1 * v2); }
double triarea(pt a, pt b, pt c) { return ((b - a) % (c - a)) / 2.0; }
int ccw(pt a, pt b, pt c) { return cmp((b - a) % (c - a)); }
pt projecao(pt v, pt w) {
  double alfa = (v * w) / (w * w);
  return w * alfa;
}
pt pivo;
bool cmp_radial(pt a, pt b) {
  int aux = ccw(pivo, a, b);
  return ((aux < 0) || (aux == 0 && norma(a - pivo) < norma(b - pivo)));
}
bool cmp_pivo(pt p, pt q) {
  int aux = cmp(p.x, q.x);
  return ((aux < 0) || (aux == 0 && cmp(p.y, q.y) < 0));
}
vector<pt> graham(vector<pt> p) {
  int i, j, n = p.size();
  vector<pt> g;
  pivo = *min_element(p.begin(), p.end(), cmp_pivo);
  sort(p.begin(), p.end(), cmp_radial);
  for (i = n - 2; i >= 0 && ccw(p[0], p[i], p[n - 1]) == 0; i--)
    ;
  reverse(p.begin() + i + 1, p.end());
  for (i = j = 0; i < n; i++) {
    while (j >= 2 && ccw(g[j - 2], g[j - 1], p[i]) >= 0) {
      g.pop_back();
      j--;
    }
    g.push_back(p[i]);
    j++;
  }
  return g;
}
int between3(pt p, pt q, pt r) {
  if (cmp((q - p) % (r - p)) == 0)
    if (cmp((q - p) * (r - p)) <= 0) return 1;
  return 0;
}
double distPR(pt p, reta r) {
  pt v = p - r.ini;
  pt w = r.fim - r.ini;
  pt proj = projecao(v, w);
  if (!between3(proj + r.ini, r.ini, r.fim))
    return min(norma(p - r.ini), norma(p - r.fim));
  return norma(v - proj);
}
bool iscolin(pt p, pt q, pt r) {
  if (cmp((q - p) % (r - p)) == 0) return true;
  return false;
}
const int MAXN = 200010;
pair<long long, long long> v[MAXN];
pair<pair<long long, long long>, int> a[MAXN];
pair<long long, int> b[MAXN];
int ans[MAXN];
int main() {
  int n, m;
  scanf(" %d %d", &(n), &(m));
  for (int i = 0; i < (n); ++i) {
    scanf(" %lld %lld", &v[i].first, &v[i].second);
  }
  for (int i = 0; i < (n - 1); ++i) {
    a[i].first.first = v[i + 1].first - v[i].second;
    a[i].first.second = v[i + 1].second - v[i].first;
    assert(a[i].first.first > 0);
    assert(a[i].first.second > 0);
    a[i].second = i;
  }
  for (int i = 0; i < (m); ++i) {
    long long x;
    scanf(" %lld", &b[i].first);
    b[i].second = i + 1;
  }
  --n;
  sort(a, a + n);
  map<pair<long long, int>, bool> st;
  sort(b, b + m);
  memset(ans, -1, sizeof(ans));
  int p = 0;
  int qtd = n;
  for (int i = 0; i < (m); ++i) {
    long long val = b[i].first;
    int idx = b[i].second;
    while (p < n && a[p].first.first <= val) {
      st[make_pair(a[p].first.second, a[p].second)] = true;
      ++p;
    }
    auto it = st.lower_bound(make_pair(val, -1));
    if (it == st.end()) {
      continue;
      ans[0] = -1;
      break;
    }
    ans[it->first.second] = idx;
    st.erase(it);
  }
  bool ok = true;
  for (int i = 0; i < (n); ++i)
    if (ans[i] == -1) {
      ok = false;
      break;
    }
  if (ok) {
    printf("Yes\n");
    for (int i = 0; i < (n); ++i) printf("%d ", ans[i]);
    printf("\n");
  } else {
    printf("No\n");
  }
  return 0;
}
