#include <bits/stdc++.h>
using namespace std;
int n, m;
int x[505], y[505];
int len[505], print[505];
int fdist(int a, int b) {
  int ret = abs(x[a] - x[b]) + abs(y[a] - y[b]);
  return ret;
}
int f(int s) {
  memset((print), (-1), sizeof(print));
  bool taken[505] = {};
  int i = s;
  while (1) {
    int dist = fdist((i - 1 + n) % n, i) + fdist(i, (i + 1) % n), done = 0;
    for (int j = 0; j < (m); j++)
      if (!taken[j] && dist == len[j]) {
        taken[j] = 1, print[i] = j + 1, done = 1;
        break;
      }
    if (!done) return 0;
    i += 2, i %= n;
    if (i == s) return 1;
  }
}
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", &len[i]);
  if (f(0) || f(1)) {
    printf("YES\n");
    for (int i = 0; i < (n); i++) {
      if (i) printf(" ");
      printf("%d", print[i]);
    }
    printf("\n");
  } else
    printf("NO\n");
  return 0;
}
