#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, x, y, xx, yy, i, j, m, w = 0, x0, y0;
  int len[505], le[505], ans[505];
  bool flag[505];
  scanf("%d %d", &n, &m);
  scanf("%d %d", &x, &y);
  x0 = x;
  y0 = y;
  for (i = 1; i < n; i++) {
    scanf("%d %d", &xx, &yy);
    le[w] = abs(x - xx) + abs(y - yy);
    x = xx;
    y = yy;
    w++;
  }
  le[w] = abs(x0 - xx) + abs(y0 - yy);
  w++;
  for (i = 0; i < m; i++) {
    scanf("%d", &len[i]);
  }
  if (n % 2 == 1) {
    printf("NO\n");
    return 0;
  }
  memset(flag, 0, sizeof(flag));
  for (i = 0; i < n; i += 2) {
    x = le[i] + le[i + 1];
    for (j = 0; j < m; j++) {
      if (flag[j]) continue;
      if (x == len[j]) {
        ans[i] = -1;
        ans[i + 1] = j + 1;
        flag[j] = 1;
        break;
      }
    }
    if (j == m) break;
  }
  if (i == n) {
    printf("YES\n");
    for (i = 0; i < n; i++) {
      printf("%d ", ans[i]);
    }
    printf("\n");
    return 0;
  }
  memset(flag, 0, sizeof(flag));
  for (i = 1; i < n; i += 2) {
    x = le[i] + le[(i + 1) % n];
    for (j = 0; j < m; j++) {
      if (flag[j]) continue;
      if (x == len[j]) {
        ans[i] = -1;
        ans[(i + 1) % n] = j + 1;
        flag[j] = 1;
        break;
      }
    }
    if (j == m) break;
  }
  if (i == n + 1) {
    printf("YES\n");
    for (i = 0; i < n; i++) {
      printf("%d ", ans[i]);
    }
    printf("\n");
    return 0;
  } else
    printf("NO\n");
  return 0;
}
