#include <bits/stdc++.h>
using namespace std;
const int maxn = 1000;
double x[maxn], y[maxn], l[maxn], ans[maxn];
int u[maxn], n, m;
int make(int v) {
  int L = v - 1, R = v + 1;
  if (L < 1) L = n;
  if (R > n) R = 1;
  if (x[L] != x[v] && y[L] != y[v]) return -1;
  if (x[R] != x[v] && y[R] != y[v]) return -1;
  double len =
      abs(x[L] - x[v]) + abs(y[L] - y[v]) + abs(x[R] - x[v]) + abs(y[R] - y[v]);
  for (int i = 1; i <= m; i++)
    if (!u[i] && l[i] == len) {
      u[i] = 1;
      return i;
    }
  return -1;
}
void output() {
  cout << "YES" << endl;
  for (int i = 1; i <= n; i++) {
    if (ans[i] == 0) ans[i] = -1;
    cout << ans[i] << " ";
  }
  cout << endl;
}
int main() {
  cin >> n >> m;
  for (int i = 1; i <= n; i++) cin >> x[i] >> y[i];
  for (int i = 1; i <= m; i++) cin >> l[i];
  int flag;
  memset(u, 0, sizeof(u));
  memset(ans, 0, sizeof(ans));
  for (int i = 1; i <= n; i += 2) ans[i] = make(i);
  flag = 1;
  for (int i = 1; i <= n; i += 2)
    if (ans[i] == -1) flag = 0;
  if (flag) {
    output();
    return 0;
  }
  memset(u, 0, sizeof(u));
  memset(ans, 0, sizeof(ans));
  for (int i = 2; i <= n; i += 2) ans[i] = make(i);
  flag = 1;
  for (int i = 2; i <= n; i += 2)
    if (ans[i] == -1) flag = 0;
  if (flag) {
    output();
    return 0;
  }
  cout << "NO" << endl;
  return 0;
}
