#include <bits/stdc++.h>
using namespace std;
int g[505], ans[505];
int f[505];
int x[505], y[505];
int n, m;
void getans(int st) {
  int i, j, cur = st;
  int dist;
  memset(f, -1, sizeof(f));
  memset(ans, -1, sizeof(ans));
  for (i = 0; i < n / 2; i++) {
    dist = abs(x[cur - 1] - x[cur]) + abs(y[cur - 1] - y[cur]) +
           abs(x[cur + 1] - x[cur]) + abs(y[cur + 1] - y[cur]);
    for (j = 0; j < m; j++) {
      if (f[j] == -1 && g[j] == dist) {
        f[j] = cur;
        ans[cur - 1] = j + 1;
        break;
      }
    }
    if (j == m) return;
    cur += 2;
  }
  printf("YES\n");
  for (i = 0; i < n; i++) printf("%d ", ans[i]);
  exit(0);
}
int main() {
  int i, ch;
  scanf("%d%d", &n, &m);
  for (i = 1; i <= n; i++) {
    scanf("%d%d", &x[i], &y[i]);
  }
  for (i = 0; i < m; i++) {
    scanf("%d", &ch);
    g[i] = ch;
  }
  x[0] = x[n];
  y[0] = y[n];
  x[n + 1] = x[1];
  y[n + 1] = y[1];
  for (i = 1; i <= 2; i++) {
    getans(i);
  }
  printf("NO");
  return 0;
}
