#include <bits/stdc++.h>
using namespace std;
double eps = 1e-7;
bool les(double a, double b) { return a < b - eps; }
bool eq(double a, double b) { return abs(a - b) <= eps; }
const int MAXn = 500 + 10;
int n, m, arr[MAXn][2];
int dist(int *a, int *b) {
  int d1 = a[0] - b[0], d2 = a[1] - b[1];
  if (d1 < 0) d1 = -d1;
  if (d2 < 0) d2 = -d2;
  return d1 + d2;
}
vector<int> check(multimap<int, int> mip, int a) {
  vector<int> ret;
  for (int i = 0; i < n; i++) {
    if (i % 2 != a) {
      ret.push_back(-1);
      continue;
    }
    int d = dist(arr[i], arr[(i - 1 + n) % n]) + dist(arr[i], arr[i + 1]);
    map<int, int>::iterator iter = mip.find(d);
    if (iter != mip.end()) {
      ret.push_back(iter->second);
      mip.erase(iter);
    } else {
      ret.clear();
      return ret;
    }
  }
  return ret;
}
int main() {
  cin >> n >> m;
  multimap<int, int> mip;
  for (int i = 0; i < n; i++) cin >> arr[i][0] >> arr[i][1];
  for (int i = 0; i < m; i++) {
    int x;
    cin >> x;
    mip.insert(pair<int, int>(x, i + 1));
  }
  arr[n][0] = arr[0][0];
  arr[n][1] = arr[0][1];
  arr[n + 1][0] = arr[1][0];
  arr[n + 1][1] = arr[1][1];
  vector<int> vec;
  if ((vec = check(mip, 0)).size() > 0 || (vec = check(mip, 1)).size() > 0) {
    cout << "YES" << endl;
    for (int i = 0; i < (int)vec.size(); i++)
      cout << vec[i] << (i == vec.size() - 1 ? "\n" : " ");
  } else {
    cout << "NO" << endl;
  }
  return 0;
}
