#include <bits/stdc++.h>
using namespace std;
inline int abs(int n1, int n2) { return n1 < n2 ? n2 - n1 : n1 - n2; }
inline int dist(const pair<int, int> &p1, const pair<int, int> &p2) {
  return abs(p1.first - p2.first) + abs(p1.second - p2.second);
}
vector<pair<int, int> > result;
bool dfs(int n, const vector<pair<int, int> > &pos, const vector<int> &len,
         vector<bool> &used) {
  if (n == pos.size() - 1) return true;
  for (unsigned int i = 0; i < len.size(); ++i) {
    if (!used[i]) {
      if (len[i] == dist(pos[n], pos[n + 1]) + dist(pos[n + 1], pos[n + 2])) {
        result.push_back(make_pair(n + 1, i));
        used[i] = true;
        if (dfs(n + 2, pos, len, used)) return true;
        used[i] = false;
        result.pop_back();
      }
    }
  }
  return false;
}
int main(void) {
  int n, m;
  cin >> n >> m;
  vector<pair<int, int> > pos_(n), pos(n + 1);
  for (int i = 0; i < n; ++i) {
    cin >> pos_[i].first >> pos_[i].second;
  }
  vector<int> len(m);
  for (int i = 0; i < m; ++i) cin >> len[i];
  vector<bool> used(m);
  copy(pos_.begin(), pos_.end(), pos.begin());
  pos[n] = pos[0];
  if (dfs(0, pos, len, used)) {
    cout << "YES" << endl;
    int idx = 0;
    for (int i = 0; i < n; ++i) {
      if (i) cout << ' ';
      if (result[idx].first == i)
        cout << result[idx++].second + 1;
      else
        cout << -1;
    }
    cout << endl;
  } else {
    rotate_copy(pos_.begin(), pos_.end() - 1, pos_.end(), pos.begin());
    pos[n] = pos[0];
    if (dfs(0, pos, len, used)) {
      cout << "YES" << endl;
      int idx = 0;
      for (int i = 0; i < n; ++i) {
        if (i) cout << ' ';
        if (result[idx].first == i + 1)
          cout << result[idx++].second + 1;
        else
          cout << -1;
      }
      cout << endl;
    } else
      cout << "NO" << endl;
  }
  return 0;
}
