#include <bits/stdc++.h>
int n, m, l[510], x[510], y[510], a[510];
bool u[510];
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= n; i++) scanf("%d%d", &x[i], &y[i]);
  x[0] = x[n];
  y[0] = y[n];
  x[n + 1] = x[1];
  y[n + 1] = y[1];
  for (int i = 0; i < m; i++) scanf("%d", &l[i]);
  memset(u, false, sizeof(u));
  bool ok = true;
  memset(a, -1, sizeof(a));
  for (int i = 1; i < n; i += 2) {
    int cl = std::max(abs(x[i] - x[i - 1]), abs(y[i] - y[i - 1])) +
             std::max(abs(x[i] - x[i + 1]), abs(y[i] - y[i + 1]));
    bool found = false;
    for (int j = 0; j < m; j++)
      if (!u[j] && cl == l[j]) {
        a[i] = j;
        u[j] = true;
        found = true;
        break;
      }
    if (!found) {
      ok = false;
      break;
    }
  }
  if (ok) {
    puts("YES");
    for (int i = 1; i < n; i += 2) printf("%d -1 ", a[i] + 1);
    return 0;
  }
  memset(u, false, sizeof(u));
  memset(a, -1, sizeof(a));
  ok = true;
  for (int i = 2; i <= n; i += 2) {
    int cl = std::max(abs(x[i] - x[i - 1]), abs(y[i] - y[i - 1])) +
             std::max(abs(x[i] - x[i + 1]), abs(y[i] - y[i + 1]));
    bool found = false;
    for (int j = 0; j < m; j++)
      if (!u[j] && cl == l[j]) {
        a[i] = j;
        u[j] = true;
        found = true;
        break;
      }
    if (!found) {
      ok = false;
      break;
    }
  }
  if (ok) {
    puts("YES");
    for (int i = 2; i <= n; i += 2) printf("-1 %d ", a[i] + 1);
    return 0;
  }
  puts("NO");
}
