#include <bits/stdc++.h>
using namespace std;
vector<pair<int, int> > pts;
vector<pair<int, int> > rods1;
vector<pair<int, int> > rods2;
vector<int> r1;
vector<int> r2;
vector<int> rr1;
vector<int> rr2;
bool cmp(const pair<int, int> &a, const pair<int, int> &b) {
  return a.first < b.first;
}
inline int m_dist(pair<int, int> a, pair<int, int> b) {
  return abs(a.first - b.first) + abs(a.second - b.second);
}
int main() {
  ios::sync_with_stdio(0);
  int n, m;
  int a, b, r;
  cin >> n >> m;
  for (int i = 0; i < n; i++) {
    cin >> a >> b;
    pts.push_back(make_pair(a, b));
  }
  for (int i = 0; i < m; i++) {
    cin >> r;
    rods1.push_back({r, i});
    rods2.push_back({r, i});
  }
  sort(rods1.begin(), rods1.end());
  sort(rods2.begin(), rods2.end());
  for (int i = 0; i < n - 1; i += 2) {
    r1.push_back(m_dist(pts[i], pts[i + 1]) +
                 m_dist(pts[i + 1], pts[(i + 2) % n]));
    r2.push_back(m_dist(pts[(i - 1 + n) % n], pts[i % n]) +
                 m_dist(pts[i % n], pts[(i + 1) % n]));
  }
  bool check1 = true;
  for (auto r : r1) {
    auto fr =
        lower_bound(rods1.begin(), rods1.end(), pair<int, int>(r, 0), cmp);
    if (fr == rods1.end() || r != (*fr).first) {
      check1 = false;
      break;
    } else {
      rr1.push_back((*fr).second);
      rods1.erase(fr);
    }
  }
  bool check2 = true;
  for (auto r : r2) {
    auto fr =
        lower_bound(rods2.begin(), rods2.end(), pair<int, int>(r, 0), cmp);
    if (fr == rods2.end() || r != (*fr).first) {
      check2 = false;
      break;
    } else {
      rr2.push_back((*fr).second);
      rods2.erase(fr);
    }
  }
  if (check1 || check2) {
    cout << "YES\n";
    if (check1) {
      for (auto e : rr1) {
        cout << "-1" << ' ' << e + 1 << ' ';
      }
    } else {
      for (auto e : rr2) {
        cout << e + 1 << ' ' << "-1" << ' ';
      }
    }
  } else {
    cout << "NO\n";
  }
  return 0;
}
