#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m;
  cin >> n >> m;
  vector<int> x(n);
  vector<int> a(n);
  vector<int> b(n);
  vector<int> y(n);
  vector<int> r(m);
  vector<int> f(n);
  int i;
  for (i = 0; i < n; i++) {
    cin >> x[i] >> y[i];
  }
  b[0] = abs(x[0] - x[n - 1]) + abs(y[0] - y[n - 1]);
  a[0] = abs(x[0] - x[1]) + abs(y[0] - y[1]);
  b[n - 1] = abs(x[n - 2] - x[n - 1]) + abs(y[n - 2] - y[n - 1]);
  a[n - 1] = abs(x[0] - x[n - 1]) + abs(y[0] - y[n - 1]);
  for (i = 1; i < n - 1; i++) {
    a[i] = abs(x[i] - x[i + 1]) + abs(y[i] - y[i + 1]);
    b[i] = abs(x[i] - x[i - 1]) + abs(y[i] - y[i - 1]);
  }
  for (i = 0; i < m; i++) {
    cin >> r[i];
  }
  int k;
  for (i = 0; i < n; i++) {
    int flag = 0;
    int h = a[i] + b[i];
    for (k = 0; k < m; k++) {
      if (r[k] == h) {
        f[i] = k + 1;
        r[k] = -1;
        flag = 1;
        break;
      }
    }
    if (flag == 0) {
      f[i] == -1;
    } else {
      i++;
    }
  }
  for (i = 0; i < n - 1; i++) {
    if (f[i] == f[i + 1] && f[i] == 0) {
      cout << "NO" << endl;
      return 0;
    }
  }
  cout << "YES" << endl;
  for (i = 0; i < n; i++) {
    if (f[i] == 0) {
      cout << -1 << ' ';
    } else {
      cout << f[i] << ' ';
    }
  }
}
