#include <bits/stdc++.h>
using namespace std;
const long long N = 800005;
const long long maxn = 800005;
const long long mod = 1e9 + 7;
const double eps = 1e-12;
long long a[N];
struct node {
  long long d, dm, pos;
} f[N];
pair<long long, long long> g[N];
bool cmp(node a, node b) { return a.d > b.d; }
struct SplayTree;
struct SplayTree *cstm;
long long l[N], r[N], ans[N];
struct Node {
  long long key;
  SplayTree *st;
  Node *c[2], *p;
} mem[N], *cur;
struct SplayTree {
  Node *root, *nil;
  void Rotate(Node *x, long long f) {
    if (x == nil) return;
    Node *y = x->p;
    y->c[f ^ 1] = x->c[f], x->p = y->p;
    if (x->c[f] != nil) x->c[f]->p = y;
    if (y->p != nil) y->p->c[y->p->c[1] == y] = x;
    x->c[f] = y, y->p = x;
  }
  void Splay(Node *x, Node *f) {
    while (x->p != f) {
      Node *y = x->p;
      if (y->p == f)
        Rotate(x, x == y->c[0]);
      else {
        long long fd = y->p->c[0] == y;
        if (y->c[fd] == x)
          Rotate(x, fd ^ 1), Rotate(x, fd);
        else
          Rotate(y, fd), Rotate(x, fd);
      }
    }
    if (f == nil) root = x;
  }
  Node *newNode(long long v, Node *p, Node *nil) {
    cur->c[0] = cur->c[1] = nil;
    cur->p = p;
    cur->key = v;
    cur->st = cstm++;
    return cur++;
  }
  void Insert(long long v) {
    Node *x = root, *y = nil;
    while (x != nil) {
      y = x;
      x = x->c[v >= x->key];
    }
    y->c[v >= y->key] = x = newNode(v, y, nil);
    Splay(x, nil);
  }
  void Insert(long long v, long long pos) {
    Node *x = root, *y = nil;
    while (x != nil && x->key != v) {
      y = x;
      x = x->c[v >= x->key];
    }
    if (x == nil) {
      y->c[v >= y->key] = x = newNode(v, y, nil);
      cur->c[0] = cur->c[1] = nullptr;
      cur->p = cur;
      cur->key = 0;
      cur->st = cstm++;
      x->st->nil = cur++;
      x->st->root = x->st->nil;
    }
    x->st->Insert(pos);
    Splay(x, nil);
  }
  pair<long long, long long> fun(long long v) {
    Node *x = root, *y = nil;
    while (x != nil) {
      if (x->key <= v && x->key > y->key) y = x;
      x = x->c[v > x->key];
    }
    if (y != nil) return make_pair(y->key, y->st->root->key);
    return make_pair(-1, -1);
  }
  void Del() {
    Node *x = root;
    if (x->c[0] == nil && x->c[1] == nil)
      root = nil;
    else if (x->c[0] == nil) {
      x = x->c[1];
      while (x->c[0] != nil) x = x->c[0];
      Splay(x, nil);
      x->c[0] = nil;
    } else if (x->c[1] == nil) {
      x = x->c[0];
      while (x->c[1] != nil) x = x->c[1];
      Splay(x, nil);
      x->c[1] = nil;
    } else {
      x = x->c[1];
      while (x->c[0] != nil) x = x->c[0];
      Node *y = root;
      Splay(x, nil);
      Splay(y, x);
      x->c[0] = x->c[0]->c[0];
      x->c[0]->p = x;
    }
  }
  void Remove(long long v) {
    Node *x = root;
    while (x->key != v) {
      x = x->c[v >= x->key];
    }
    Splay(x, nil);
    Del();
  }
  void Remove(pair<long long, long long> it) {
    Node *x = root;
    while (x->key != it.first) {
      x = x->c[it.first >= x->key];
    }
    Splay(x, nil);
    x->st->Remove(it.second);
    if (x->st->root == x->st->nil) Del();
  }
} s, stm[N];
void Init() {
  cur = mem;
  cstm = stm;
}
int main() {
  long long n, m;
  cin >> n >> m;
  for (long long i = 1; i <= n; i++) {
    cin >> l[i] >> r[i];
    if (i >= 2) {
      f[i - 1].d = l[i] - r[i - 1];
      f[i - 1].dm = r[i] - l[i - 1];
      f[i - 1].pos = i - 1;
    }
  }
  for (long long i = 1; i <= m; i++) {
    cin >> a[i];
    g[i].first = a[i];
    g[i].second = i;
  }
  sort(f + 1, f + n, cmp);
  sort(g + 1, g + m + 1);
  long long flag = 1, j = 1;
  Init();
  cur->c[0] = cur->c[1] = nullptr;
  cur->key = 0;
  cur->p = cur;
  cur->st = cstm++;
  s.nil = cur++;
  s.root = s.nil;
  for (long long i = m; i >= 1; i--) s.Insert(g[i].first, g[i].second);
  for (long long i = 1; i < n; i++) {
    auto it = s.fun(f[i].dm);
    if (it.first != -1 && it.first >= f[i].d && it.first <= f[i].dm) {
      ans[f[i].pos] = it.second;
      s.Remove(it);
    } else {
      flag = 0;
      break;
    }
  }
  if (flag == 0)
    puts("No");
  else {
    puts("Yes");
    for (long long i = 1; i < n; i++) cout << ans[i] << " ";
  }
  return 0;
}
