#include <bits/stdc++.h>
using namespace std;
const int inf = 1 << 28;
const double INF = 1e12, EPS = 1e-9;
int n, m, l[500], ans[500];
int x[500], y[500];
bool use[500];
void out() {
  cout << "YES" << endl;
  for (int i = 0; i < n; i++) cout << ans[i] << (i == n - 1 ? "\n" : " ");
}
void run() {
  cin >> n >> m;
  for (int i = 0; i < n; i++) cin >> x[i] >> y[i];
  for (int i = 0; i < m; i++) cin >> l[i];
  for (int it = 0; it < 2; it++) {
    for (int i = 0; i < n; i++) ans[i] = -1;
    for (int i = 0; i < m; i++) use[i] = 0;
    for (int i = it; i < n; i += 2) {
      int len = abs(x[i] - x[(i + 1) % n]) + abs(y[i] - y[(i + 1) % n]);
      len += abs(x[(i + n - 1) % n] - x[i]) + abs(y[(i + n - 1) % n] - y[i]);
      bool ok = 0;
      for (int j = 0; j < m; j++)
        if (!use[j] && l[j] == len) {
          use[j] = 1;
          ans[i] = j + 1;
          ok = 1;
          break;
        }
      if (!ok) goto FAIL;
    }
    out();
    return;
  FAIL:;
  }
  cout << "NO" << endl;
}
int main() { run(); }
