#include <bits/stdc++.h>
using namespace std;
void prepare() {}
const int MAXN = 1000;
int x[MAXN];
int y[MAXN];
int b[MAXN];
int res[MAXN];
int n, m, dd;
map<int, vector<int> > a;
int abss(int aa) { return aa < 0 ? -aa : aa; }
bool trysolve() {
  int i;
  a.clear();
  memset(res, -1, sizeof(res));
  for (i = 0; i < m; i++) {
    if (a.find(b[i]) == a.end()) a[b[i]] = vector<int>(0);
    a[b[i]].push_back(i + 1);
  }
  int l;
  for (i = dd; i < n; i += 2) {
    l = abss(x[i + 2] - x[i]) + abss(y[i + 2] - y[i]);
    if (a.find(l) == a.end() || a[l].size() == 0) return false;
    res[(i + 1) % n] = a[l].back();
    a[l].pop_back();
  }
  return true;
}
bool solve() {
  int i;
  dd = 0;
  scanf("%d%d", &n, &m);
  for (i = 0; i < n; i++) scanf("%d%d", x + i, y + i);
  for (i = n; i < n + 5; i++) {
    x[i] = x[i - n];
    y[i] = y[i - n];
  }
  for (i = 0; i < m; i++) scanf("%d", b + i);
  if (trysolve()) return true;
  dd = 1;
  return trysolve();
}
int main() {
  prepare();
  if (solve()) {
    printf("YES\n");
    for (int i = 0; i < n; i++) {
      printf("%d%c", res[i], i + 1 == n ? '\n' : ' ');
    }
  } else
    printf("NO\n");
  return 0;
}
