#include <bits/stdc++.h>
using namespace std;
void init() {}
void solve() {
  int n, m;
  cin >> n >> m;
  vector<pair<int, int> > a(n);
  for (int _n(n), i(0); i < _n; i++) cin >> a[i].first >> a[i].second;
  a.push_back(a[0]);
  a.insert(a.begin(), a[n - 1]);
  vector<int> r(m);
  for (int _n(m), i(0); i < _n; i++) cin >> r[i];
  vector<int> res(n, -1);
  for (int _n(2), off(0); off < _n; off++) {
    int found = 1;
    vector<int> b(m);
    for (int i = 1 + off; i <= n; i += 2) {
      int p =
          abs(a[i].first - a[i - 1].first) + abs(a[i].second - a[i - 1].second);
      int q =
          abs(a[i].first - a[i + 1].first) + abs(a[i].second - a[i + 1].second);
      for (int _n(m), j(0); j < _n; j++) {
        if (b[j]) continue;
        if (r[j] == p + q) {
          res[i - 1] = j + 1;
          b[j] = 1;
          break;
        }
      }
      if (res[i - 1] == -1) {
        found = 0;
        break;
      }
    }
    if (found) {
      cout << "YES" << endl;
      for (int _n(n), i(0); i < _n; i++)
        cout << res[i] << (i == n - 1 ? "\n" : " ");
      return;
    }
  }
  cout << "NO" << endl;
}
int main() {
  init();
  solve();
  return 0;
}
