#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m;
  scanf("%d %d", &n, &m);
  if (m * 2 < n) {
    printf("NO\n");
    return 0;
  }
  int a[n][2];
  for (int i = 0; i < n; i++) {
    scanf("%d %d", &a[i][0], &a[i][1]);
  }
  int dl[n];
  for (int i = 0; i < n; i++) {
    int ip = i + 1;
    ip %= n;
    dl[i] = a[i][0] - a[ip][0] + a[i][1] - a[ip][1];
    dl[i] = abs(dl[i]);
  }
  int b[m];
  bool bo[m];
  int ans[n];
  for (int i = 0; i < m; i++) {
    scanf("%d", &b[i]);
    bo[i] = false;
  }
  bool end = true;
  for (int i = 0; i < n; i += 2) {
    int l = dl[i] + dl[i + 1];
    int j = 0;
    for (; j < m; j++) {
      if (bo[j]) continue;
      if (b[j] == l) break;
    }
    if (j == m) {
      end = false;
      break;
    }
    bo[j] = true;
    ans[i + 1] = j + 1;
    ans[i] = -1;
  }
  if (end) {
    printf("YES\n");
    for (int i = 0; i < n; i++) {
      printf("%d ", ans[i]);
    }
    return 0;
  }
  for (int i = 0; i < m; i++) {
    bo[i] = false;
  }
  end = true;
  for (int i = 1; i <= n; i += 2) {
    int l = dl[i] + dl[(i + 1) % n];
    int j = 0;
    for (; j < m; j++) {
      if (bo[j]) continue;
      if (b[j] == l) break;
    }
    if (j == m) {
      end = false;
      break;
    }
    bo[j] = true;
    ans[(i + 1) % n] = j + 1;
    ans[i] = -1;
  }
  if (end) {
    printf("YES\n");
    for (int i = 0; i < n; i++) {
      printf("%d ", ans[i]);
    }
  } else {
    printf("NO\n");
  }
  return 0;
}
