#include <bits/stdc++.h>
using namespace std;
int n, m;
vector<int> x, y;
map<int, vector<int> > a;
int abs(int n) { return n > 0 ? n : -n; }
int length(int i) {
  if (i == 0) i = n;
  return abs(x[i] - x[i - 1]) + abs(y[i] - y[i - 1]) + abs(x[i] - x[i + 1]) +
         abs(y[i] - y[i + 1]);
}
bool solve(const map<int, int>& q) {
  for (map<int, int>::const_iterator it = q.begin(); it != q.end(); ++it)
    if (a[it->first].size() < it->second) return false;
  return true;
}
bool solve2() {
  map<int, int> q;
  for (int i = 1; i < n; i += 2) ++q[length(i)];
  return solve(q);
}
bool solve1() {
  map<int, int> q;
  for (int i = 0; i < n; i += 2) ++q[length(i)];
  return solve(q);
}
int get(int len) {
  int ret = a[len].back();
  a[len].pop_back();
  return ret;
}
int main() {
  cin >> n >> m;
  x.resize(n);
  y.resize(n);
  for (int i = 0; i < n; ++i) cin >> x[i] >> y[i];
  x.push_back(x[0]);
  x.push_back(x[1]);
  x.push_back(x[2]);
  y.push_back(y[0]);
  y.push_back(y[1]);
  y.push_back(y[2]);
  for (int i = 0; i < m; ++i) {
    int len;
    cin >> len;
    a[len].push_back(i + 1);
  }
  if (solve2()) {
    cout << "YES" << endl;
    for (int i = 1; i < n; i += 2) cout << "-1 " << get(length(i)) << " ";
  } else if (solve1()) {
    cout << "YES" << endl;
    for (int i = 0; i < n; i += 2) cout << get(length(i)) << " -1 ";
  } else {
    cout << "NO" << endl;
  }
  return 0;
}
