#include <bits/stdc++.h>
using namespace std;
int p[600], x[600], y[600], u[600], a[600];
int n, m, i, j, k, l, d;
bool ok;
void out() {
  cout << "YES\n";
  for (i = 0; i < n; ++i)
    if (a[i])
      cout << a[i] << ' ';
    else
      cout << -1 << ' ';
  exit(0);
}
int main() {
  cin >> n >> m;
  for (i = 0; i < n; ++i) cin >> x[i] >> y[i];
  for (i = 0; i < m; ++i) cin >> p[i];
  i = 0;
  ok = 1;
  while (i < n && ok) {
    j = (i - 1 + n) % n;
    k = (i + 1 + n) % n;
    d = (abs(x[j] - x[i]) + abs(y[j] - y[i]) + abs(x[i] - x[k]) +
         abs(y[i] - y[k]));
    bool f = 0;
    for (l = 0; l < m; ++l)
      if (!u[l] && p[l] == d) {
        u[l] = 1;
        f = 1;
        break;
      }
    if (f)
      a[i] = l + 1;
    else
      ok = 0;
    i += 2;
  }
  if (ok) out();
  for (i = 0; i < m; ++i) u[i] = 0;
  for (i = 0; i < n; ++i) a[i] = 0;
  i = 1;
  ok = 1;
  while (i < n && ok) {
    j = (i - 1 + n) % n;
    k = (i + 1 + n) % n;
    d = (abs(x[j] - x[i]) + abs(y[j] - y[i]) + abs(x[i] - x[k]) +
         abs(y[i] - y[k]));
    bool f = 0;
    for (l = 0; l < m; ++l)
      if (!u[l] && p[l] == d) {
        u[l] = 1;
        f = 1;
        break;
      }
    if (f)
      a[i] = l + 1;
    else
      ok = 0;
    i += 2;
  }
  if (ok) out();
  cout << "NO";
  return 0;
}
