#include <bits/stdc++.h>
using namespace std;
int x[505], y[505], rod[505], ans[505];
bool vis[505], flag;
int n, m;
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", &rod[i]);
  for (int i = 0; i < 2; i++) {
    memset(ans, -1, sizeof(ans));
    memset(vis, 0, sizeof(vis));
    flag = 1;
    for (int j = i; j < n; j += 2) {
      int d =
          (abs(x[j] - x[(j + n - 1) % n]) + abs(y[j] - y[(j + n - 1) % n])) +
          (abs(x[j] - x[(j + 1) % n]) + abs(y[j] - y[(j + 1) % n]));
      for (int k = 0; k < m; k++) {
        if (rod[k] == d && !vis[k]) {
          vis[k] = 1;
          ans[j] = k + 1;
          break;
        }
      }
      if (ans[j] == -1) {
        flag = 0;
        break;
      }
    }
    if (flag) break;
  }
  if (!flag)
    printf("NO");
  else {
    printf("YES\n%d", ans[0]);
    for (int i = 1; i < n; i++) printf(" %d", ans[i]);
    printf("\n");
  }
}
