#include <bits/stdc++.h>
using namespace std;
pair<int, int> a[1000001], b[1000001];
int p[1000001], p1[1000001];
int o[1000001];
int n, m, sign = 0;
void nax(int *p) {
  for (int i = 1; i <= (n); i++) {
    for (int j = 1; j <= (m); j++)
      if (o[i] == 0 && abs((a[i - 1].first - a[i].first)) +
                               abs((a[i - 1].second - a[i].second)) +
                               abs((a[i + 1].first - a[i].first)) +
                               abs((a[i + 1].second - a[i].second)) ==
                           p[j]) {
        o[i] = j;
        o[i - 1] = -1;
        o[i + 1] = -1;
        p[j] = -1;
      }
    if (o[i] == 0) {
      sign = 1;
    }
  }
}
int main() {
  cin >> n >> m;
  for (int i = 1; i <= (n); i++) cin >> a[i].first >> a[i].second;
  for (int j = 1; j <= (m); j++) cin >> p[j];
  a[n + 1] = a[1];
  a[0] = a[n];
  sign = 0;
  for (int i = 1; i <= (m); i++) p1[i] = p[i];
  nax(p1);
  if (!sign) {
    cout << "YES" << '\n';
    for (int i = 1; i <= (n); i++) {
      cout << o[i] << ' ';
    }
    return 0;
  }
  for (int i = 1; i <= (m); i++) p1[i] = p[i];
  sign = 0;
  memset(o, 0, sizeof(o));
  for (int i = 1; i <= (n + 1); i++) b[i] = a[i];
  for (int i = 0; i <= n; i++) a[i] = b[i + 1];
  a[n + 1] = a[1];
  nax(p1);
  if (!sign) {
    cout << "YES" << '\n';
    cout << o[n] << ' ';
    for (int i = 1; i <= (n - 1); i++) {
      cout << o[i] << ' ';
    }
    return 0;
  }
  for (int i = 1; i <= (m); i++) p1[i] = p[i];
  sign = 0;
  memset(o, 0, sizeof(o));
  for (int i = 0; i <= n; i++) b[i] = a[i];
  for (int i = 1; i <= n + 1; i++) a[i] = b[i - 1];
  a[0] = a[n];
  nax(p1);
  if (!sign) {
    cout << "YES" << '\n';
    for (int i = 2; i <= n; i++) {
      cout << o[i] << ' ';
    }
    cout << o[1];
    return 0;
  }
  cout << "NO";
  return 0;
}
