#include <bits/stdc++.h>
using namespace std;
int x[500], y[500];
int n, m;
int dis(int i, int j) { return abs(x[i] - x[j]) + abs(y[i] - y[j]); }
int main() {
  cin >> n >> m;
  for (int i = 0; i < n; i++) cin >> x[i] >> y[i];
  int l[500];
  for (int i = 0; i < m; i++) cin >> l[i];
  int mark[500] = {0}, ans[500], t = 1;
  memset(ans, -1, sizeof ans);
  for (int i = 1; i < n; i += 2) {
    int d = dis(i, i - 1) + dis(i, (i + 1) % n);
    for (int j = 0; j < m; j++) {
      if (!mark[j] && d == l[j]) {
        mark[j] = 1;
        ans[i] = j;
        break;
      }
    }
    if (ans[i] == -1) t = 0;
  }
  if (!t) {
    memset(mark, 0, sizeof mark);
    memset(ans, -1, sizeof ans);
    t = 1;
    for (int i = 0; i < n; i += 2) {
      int d = dis(i, (i + 1) % n) + dis(i, (i + n - 1) % n);
      for (int j = 0; j < m; j++) {
        if (!mark[j] && d == l[j]) {
          mark[j] = 1;
          ans[i] = j;
          break;
        }
      }
      if (ans[i] == -1) t = 0;
    }
  }
  if (t) {
    cout << "YES" << endl << (ans[0] == -1 ? -1 : ans[0] + 1);
    for (int i = 1; i < n; i++) {
      cout << " " << (ans[i] == -1 ? -1 : ans[i] + 1);
    }
    cout << endl;
  } else
    cout << "NO" << endl;
  return 0;
}
