#include <bits/stdc++.h>
using namespace std;
long long modpow(long long a, long long b,
                 long long mod = (long long)(1e9 + 7)) {
  if (!b) return 1;
  a %= mod;
  return modpow(a * a % mod, b / 2, mod) * (b & 1 ? a : 1, mod) % mod;
}
int dist(complex<int> a, complex<int> b) {
  return abs(a.imag() - b.imag()) + abs(a.real() - b.real());
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n, m;
  cin >> n >> m;
  complex<int> arr[n];
  for (int i = 0; i < n; i++) {
    int x, y;
    cin >> x >> y;
    arr[i] = complex<int>(x, y);
  }
  int len[m];
  bool used[m];
  memset(used, false, sizeof(used));
  for (int i = 0; i < m; i++) cin >> len[i];
  bool unsolved = false;
  int ans[n];
  memset(ans, -1, sizeof(ans));
  for (int i = 0; i < n; i++)
    if (i & 1) {
      int k = -1;
      int d =
          abs(arr[i] - arr[(i - 1 + n) % n]) + abs(arr[i] - arr[(i + 1) % n]);
      for (int j = 0; j < m; j++)
        if (!used[j] && len[j] == d) {
          k = j;
          break;
        }
      if (k == -1) {
        unsolved = true;
        break;
      }
      used[k] = true;
      ans[i] = k + 1;
    }
  if (!unsolved) {
    cout << "YES" << endl;
    for (int i = 0; i < n; i++) cout << ans[i] << " ";
    cout << endl;
  } else {
    memset(used, false, sizeof(used));
    memset(ans, -1, sizeof(ans));
    for (int i = 0; i < n; i++)
      if (!(i & 1)) {
        int k = -1;
        int d =
            dist(arr[i], arr[(i - 1 + n) % n]) + dist(arr[i], arr[(i + 1) % n]);
        for (int j = 0; j < m; j++)
          if (!used[j] && len[j] == d) {
            k = j;
            break;
          }
        if (k == -1) {
          cout << "NO" << endl;
          exit(0);
        }
        used[k] = true;
        ans[i] = k + 1;
      }
    cout << "YES" << endl;
    for (int i = 0; i < n; i++) cout << ans[i] << " ";
    cout << endl;
  }
  return 0;
}
