#include <bits/stdc++.h>
using namespace std;
long double eps = 1e-9;
const long double INF = 1e18;
int main() {
  int n, m;
  cin >> n >> m;
  vector<int> len, len2;
  vector<int> p, r;
  vector<pair<int, int> > pt;
  int x, y;
  for (int i = 0; i < n; i++) {
    cin >> x >> y;
    pt.push_back(make_pair(x, y));
  }
  for (int i = 0; i < m; i++) {
    cin >> x;
    len.push_back(x);
  }
  vector<bool> used(len.size(), false);
  vector<int> res(pt.size(), -1);
  int c = 0;
  for (int i = 0; i < pt.size(); i += 2) {
    int x =
        max(abs(pt[i].first - pt[(i - 1 + pt.size()) % pt.size()].first),
            abs(pt[i].second - pt[(i - 1 + pt.size()) % pt.size()].second)) +
        max(abs(pt[i].first - pt[(i + 1) % pt.size()].first),
            abs(pt[i].second - pt[(i + 1) % pt.size()].second));
    bool flag = true;
    for (int j = 0; j < len.size() && flag; j++) {
      if (len[j] == x && !used[j]) {
        flag = false;
        used[j] = true;
        res[i] = j + 1;
        c++;
      }
    }
  }
  if (c == pt.size() / 2) {
    cout << "YES" << endl;
    for (int i = 0; i < res.size(); i++) {
      cout << res[i] << ' ';
    }
    return 0;
  }
  c = 0;
  used.assign(len.size(), false);
  res.assign(pt.size(), -1);
  for (int i = 1; i < pt.size(); i += 2) {
    int x =
        max(abs(pt[i].first - pt[(i - 1 + pt.size()) % pt.size()].first),
            abs(pt[i].second - pt[(i - 1 + pt.size()) % pt.size()].second)) +
        max(abs(pt[i].first - pt[(i + 1) % pt.size()].first),
            abs(pt[i].second - pt[(i + 1) % pt.size()].second));
    bool flag = true;
    for (int j = 0; j < len.size() && flag; j++) {
      if (len[j] == x && !used[j]) {
        flag = false;
        used[j] = true;
        res[i] = j + 1;
        c++;
      }
    }
  }
  if (c == pt.size() / 2) {
    cout << "YES" << endl;
    for (int i = 0; i < res.size(); i++) {
      cout << res[i] << ' ';
    }
    return 0;
  }
  cout << "NO";
  return 0;
}
