#include <bits/stdc++.h>
using namespace std;
const int maxn = 512;
int n, m;
int x[maxn], y[maxn];
struct rod {
  int len, index;
  rod(int _l = 0, int _i = 0) {
    len = _l;
    index = _i;
  }
  bool operator<(const rod& r) const { return len < r.len; }
} R[maxn];
rod L[maxn];
int dist(int i, int j) { return abs(x[i] - x[j]) + abs(y[i] - y[j]); }
int ans[maxn];
bool judge() {
  memset(ans, -1, sizeof(ans));
  sort(L, L + n / 2);
  int ii = 0, jj = 0;
  while (ii < m && jj < n / 2) {
    if (R[ii].len == L[jj].len) {
      ans[L[jj].index] = R[ii].index;
      ii++, jj++;
    } else if (R[ii].len < L[jj].len)
      ii++;
    else
      break;
  }
  if (jj == n / 2) {
    puts("YES");
    for (int i = 0; i < n; ++i) {
      if (ans[i] == -1)
        printf("%d", ans[i]);
      else
        printf("%d", ans[i] + 1);
      if (i == n - 1)
        puts("");
      else
        putchar(' ');
    }
    return true;
  }
  return false;
}
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 0; i < n; ++i) {
    scanf("%d%d", &x[i], &y[i]);
  }
  for (int i = 0; i < m; ++i) {
    scanf("%d", &R[i].len);
    R[i].index = i;
  }
  sort(R, R + m);
  for (int i = 0; i < n / 2; ++i) {
    L[i].len = dist(2 * i, (n + 2 * i - 1) % n) + dist(2 * i, 2 * i + 1);
    L[i].index = i * 2;
  }
  if (judge()) return 0;
  for (int i = 0; i < n / 2; ++i) {
    L[i].len = dist(2 * i + 1, (2 * i + 2) % n) + dist(2 * i, 2 * i + 1);
    L[i].index = i * 2 + 1;
  }
  if (judge()) return 0;
  puts("NO");
  return 0;
}
