#include <bits/stdc++.h>
using namespace std;
int n, t, m;
int a[10000];
bool used[10000];
int x[10000], y[10000];
int ans[10000];
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 0; i < n; i++) scanf("%d%d", &x[i], &y[i]);
  for (int j = 0; j < m; j++) scanf("%d", &a[j]);
  x[n] = x[0];
  y[n] = y[0];
  x[n + 1] = x[1];
  y[n + 1] = y[1];
  x[n + 2] = x[2];
  y[n + 2] = y[2];
  for (int cur = 0; cur < 2; cur++) {
    memset(used, false, sizeof(used));
    bool haveans = true;
    for (int i = cur; i < cur + n; i += 2) {
      int l1 = abs(x[i + 1] - x[i]) + abs(y[i + 1] - y[i]);
      int l2 = abs(x[i + 2] - x[i + 1]) + abs(y[i + 2] - y[i + 1]);
      int len = l1 + l2;
      bool ok = false;
      int num;
      for (int j = 0; j < m; j++)
        if (!used[j] && a[j] == len) {
          ok = true;
          num = j;
          used[j] = true;
          break;
        }
      if (!ok) {
        haveans = false;
        break;
      } else {
        ans[i] = -1;
        ans[(i + 1) % n] = num + 1;
        ans[(i + 2) % n] = -1;
      }
    }
    if (haveans) {
      printf("YES\n");
      for (int i = 0; i < n; i++) printf("%d ", ans[i]);
      printf("\n");
      return 0;
    }
  }
  printf("NO\n");
  return 0;
}
