#include <bits/stdc++.h>
using namespace std;
namespace patch {
template <typename T>
std::string to_string(const T& n) {
  std::ostringstream stm;
  stm << n;
  return stm.str();
}
}  // namespace patch
const long double PI = 3.14159265358979323846;
long long mdf = 1e+9 + 7;
long double eps = 1e-12;
const long long INF = 3e18 + 1337;
int A = 4;
struct Matrix {
  vector<vector<long long>> mx =
      vector<vector<long long>>(A, vector<long long>(A, 0));
  Matrix operator*(const Matrix& other) {
    Matrix temp;
    for (int i = 0; i < A; i++)
      for (int j = 0; j < A; j++)
        for (int k = 0; k < A; k++) temp.mx[i][j] += mx[i][k] * other.mx[k][j];
    for (int i = 0; i < A; i++)
      for (int j = 0; j < A; j++) temp.mx[i][j] %= mdf;
    return temp;
  };
};
Matrix exp_matrix(Matrix a, int k) {
  Matrix temp;
  for (int i = 0; i < A; i++) temp.mx[i][i] = 1;
  while (k) {
    if (k % 2) temp = temp * a;
    a = a * a;
    k /= 2;
  }
  return temp;
}
long long gcd(long long a, long long b) { return a == 0 ? b : gcd(b % a, a); }
bool isAPrime(long long m) {
  for (long long p = 2; p * p <= m; p++) {
    if (m % p == 0) {
      return false;
    }
  }
  return true;
}
long long binpow(long long a, long long n) {
  if (n == 0) return 1;
  if (n % 2 == 1)
    return (binpow(a, n - 1) * a) % mdf;
  else {
    long long b = binpow(a, n / 2) % mdf;
    return (b * b) % mdf;
  }
}
long long fact[100005];
long long C(int n, int k) {
  return fact[n] * binpow(fact[k], mdf - 2) % mdf *
         binpow(fact[n - k], mdf - 2) % mdf;
}
int count_setbits(int N) {
  int cnt = 0;
  while (N > 0) {
    cnt += (N & 1);
    N = N >> 1;
  }
  return cnt;
}
long long phi(long long n) {
  long long result = n;
  for (long long i = 2; i * i <= n; ++i)
    if (n % i == 0) {
      while (n % i == 0) n /= i;
      result -= result / i;
    }
  if (n > 1) result -= result / n;
  return result;
}
bool compare(pair<int, long long> a, pair<int, long long> b) {
  return a.second < b.second;
}
int mergethem(vector<int>& a, int l, int m, int r) {
  int Inv = 0;
  vector<int> buff(r - l + 1);
  int pos1 = l, pos2 = m + 1, posB = 0;
  while (pos1 <= m && pos2 <= r) {
    if (a[pos1] < a[pos2]) {
      buff[posB++] = a[pos1++];
    } else {
      Inv += m - pos1 + 1;
      buff[posB++] = a[pos2++];
    }
  }
  while (pos1 <= m) buff[posB++] = a[pos1++];
  while (pos2 <= r) buff[posB++] = a[pos2++];
  copy(buff.begin(), buff.end(), a.begin() + l);
  return Inv;
}
int mergesort(vector<int>& a, int l, int r) {
  int curInv = 0;
  if (l == r) return curInv;
  int m = (l + r) / 2;
  curInv += mergesort(a, l, m);
  curInv += mergesort(a, m + 1, r);
  curInv += mergethem(a, l, m, r);
  return curInv;
}
int sz[1];
int p[1];
int get(int v) {
  if (p[v] != v) p[v] = get(p[v]);
  return p[v];
}
void union_sets(int a, int b) {
  a = get(a);
  b = get(b);
  if (a == b) return;
  if (sz[a] > sz[b]) swap(a, b);
  p[a] = b;
  sz[b] += sz[a];
}
struct island {
  long long l, r;
};
void solve(int cs) {
  int n, m;
  cin >> n >> m;
  vector<island> islands(n);
  for (int i = 0; i < n; i++) cin >> islands[i].l >> islands[i].r;
  vector<long long> bridges(m);
  for (int i = 0; i < m; i++) cin >> bridges[i];
  vector<pair<long long, pair<int, int>>> abv;
  for (int i = 0; i < n - 1; i++) {
    long long l1 = islands[i].l, r1 = islands[i].r;
    long long l2 = islands[i + 1].l, r2 = islands[i + 1].r;
    abv.push_back({l2 - r1, {1, i}});
    abv.push_back({r2 - l1, {3, i}});
  }
  for (int i = 0; i < m; i++) abv.push_back({bridges[i], {2, i}});
  sort(abv.begin(), abv.end());
  set<pair<long long, int>> cands;
  vector<int> ans(n - 1);
  for (auto cur : abv) {
    int tp = cur.second.first;
    int i = cur.second.second;
    if (tp == 1) {
      long long l1 = islands[i].l, r1 = islands[i].r;
      long long l2 = islands[i + 1].l, r2 = islands[i + 1].r;
      cands.insert({r2 - l1, i});
    } else if (tp == 3) {
      long long l1 = islands[i].l, r1 = islands[i].r;
      long long l2 = islands[i + 1].l, r2 = islands[i + 1].r;
      cands.erase({r2 - l1, i});
    } else if (cands.size()) {
      auto itr = cands.begin();
      int j = (*itr).second;
      ans[j] = i + 1;
      cands.erase(itr);
    }
  }
  for (int i = 0; i < n - 1; i++)
    if (!ans[i]) {
      cout << "No";
      return;
    }
  cout << "Yes\n";
  for (int i = 0; i < n - 1; i++) cout << ans[i] << " ";
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int q = 1;
  int i = 0;
  while (q--) solve(++i);
  return 0;
}
