#include <bits/stdc++.h>
using namespace std;
int N, M;
vector<int> g, p, us;
int main() {
  cin >> N >> M;
  g.resize(N + 2);
  p.resize(M);
  us.resize(M, 0);
  int a, b, a0, b0;
  cin >> a0 >> b0;
  a = a0;
  b = b0;
  g[0] = 0;
  for (int i = 1; i < N; i++) {
    int c, d, dd;
    cin >> c >> d;
    if (abs(c - a) == 0)
      dd = abs(b - d);
    else
      dd = abs(c - a);
    g[i] = dd + g[i - 1];
    a = c;
    b = d;
  }
  if (abs(a - a0) == 0)
    g[N] = abs(b - b0) + g[N - 1];
  else
    g[N] = abs(a - a0) + g[N - 1];
  g[N + 1] = g[1] - g[0] + g[N];
  for (int i = 0; i < M; i++) cin >> p[i];
  vector<int> answ;
  bool bb = false;
  for (int i = 0; i < N; i += 2) {
    int dd = g[i + 2] - g[i];
    bb = false;
    for (int j = 0; j < M && !bb; j++) {
      if (us[j] == 0 && p[j] == dd) {
        us[j] = 1;
        bb = true;
        answ.push_back(-1);
        answ.push_back(j + 1);
      }
    }
    if (!bb) break;
  }
  if (bb) {
    cout << "YES" << endl;
    for (int i = 0; i < answ.size(); i++) cout << answ[i] << " ";
    return 0;
  }
  answ.resize(0);
  us.resize(0);
  us.resize(M, 0);
  for (int i = 1; i <= N; i += 2) {
    int dd = g[i + 2] - g[i];
    bb = false;
    for (int j = 0; j < M && !bb; j++) {
      if (us[j] == 0 && p[j] == dd) {
        us[j] = 1;
        bb = true;
        answ.push_back(-1);
        answ.push_back(j + 1);
      }
    }
    if (!bb) break;
  }
  if (bb) {
    cout << "YES" << endl;
    cout << answ[answ.size() - 1] << ' ';
    for (int i = 0; i < answ.size() - 1; i++) cout << answ[i] << " ";
    return 0;
  }
  cout << "NO";
  return 0;
}
