#include <bits/stdc++.h>
using namespace std;
int modul(int x) {
  if (x < 0) return -x;
  return x;
}
int dist(pair<int, int> p1, pair<int, int> p2) {
  return modul(p1.first - p2.first) + modul(p1.second - p2.second);
}
int main() {
  int n, m;
  cin >> n >> m;
  vector<pair<int, int> > v(n);
  for (int i = 0; i < n; i++) cin >> v[i].first >> v[i].second;
  map<int, vector<int> > cuantos;
  for (int i = 0; i < m; i++) {
    int x;
    cin >> x;
    cuantos[x].push_back(i);
  }
  map<int, vector<int> > c = cuantos;
  bool ok = true;
  vector<int> sol(n, -1);
  for (int i = 0; i < n and ok; i += 2) {
    int len =
        dist(v[(i + 2) % n], v[(i + 1) % n]) + dist(v[(i + 1) % n], v[i % n]);
    if (int(c[len].size()) == 0)
      ok = false;
    else {
      sol[(i + 1) % n] = 1 + c[len][int(c[len].size()) - 1];
      c[len].pop_back();
    }
  }
  if (not ok) {
    c = cuantos;
    ok = true;
    sol = vector<int>(n, -1);
    for (int i = 0; i < n and ok; i += 2) {
      int len = dist(v[(i + 3) % n], v[(i + 2) % n]) +
                dist(v[(i + 2) % n], v[(i + 1) % n]);
      if (int(c[len].size()) == 0)
        ok = false;
      else {
        sol[(i + 2) % n] = 1 + c[len][int(c[len].size()) - 1];
        c[len].pop_back();
      }
    }
  }
  if (ok) {
    cout << "YES" << endl;
    for (int i = 0; i < n; i++) {
      if (i > 0) cout << " ";
      cout << sol[i];
    }
    cout << endl;
  } else {
    cout << "NO" << endl;
  }
}
