#include <bits/stdc++.h>
using namespace std;
const int lim = 1000;
int x[lim];
int y[lim];
int res[lim];
int main() {
  int n, m;
  cin >> n >> m;
  for (int i = 0; i < n; ++i) {
    cin >> x[i] >> y[i];
  }
  vector<int> length(m);
  vector<int> index(m);
  for (int i = 0; i < m; ++i) {
    cin >> length[i];
    index[i] = i + 1;
  }
  vector<int> l1 = length;
  vector<int> ind1 = index;
  memset(res, -1, sizeof(res));
  bool bad = false;
  for (int i = 0; i < n; i += 2) {
    int l = 0;
    l +=
        abs(x[i % n] - x[(i - 1 + n) % n]) + abs(y[i % n] - y[(i - 1 + n) % n]);
    l +=
        abs(x[i % n] - x[(i + 1 + n) % n]) + abs(y[i % n] - y[(i + 1 + n) % n]);
    vector<int>::iterator it = std::find((length).begin(), (length).end(), l);
    if (it == length.end()) {
      bad = true;
      break;
    }
    int k = it - length.begin();
    res[i] = index[k];
    length.erase(length.begin() + k);
    index.erase(index.begin() + k);
  }
  if (!bad) {
    cout << "YES" << endl;
    for (int i = 0; i < n; ++i) {
      cout << res[i] << ' ';
    }
    cout << endl;
    return 0;
  }
  memset(res, -1, sizeof(res));
  length = l1;
  index = ind1;
  bad = false;
  for (int i = 1; i < n + 1; i += 2) {
    int l = 0;
    l +=
        abs(x[i % n] - x[(i - 1 + n) % n]) + abs(y[i % n] - y[(i - 1 + n) % n]);
    l +=
        abs(x[i % n] - x[(i + 1 + n) % n]) + abs(y[i % n] - y[(i + 1 + n) % n]);
    vector<int>::iterator it = std::find((length).begin(), (length).end(), l);
    if (it == length.end()) {
      bad = true;
      break;
    }
    int k = it - length.begin();
    res[i] = index[k];
    length.erase(length.begin() + k);
    index.erase(index.begin() + k);
  }
  if (!bad) {
    cout << "YES" << endl;
    for (int i = 0; i < n; ++i) {
      cout << res[i] << ' ';
    }
    cout << endl;
  } else {
    cout << "NO" << endl;
  }
  return 0;
  return 0;
}
