#include <bits/stdc++.h>
int d(std::pair<int, int>& p, std::pair<int, int>& q) {
  return std::abs(p.second - q.second) + std::abs(q.first - p.first);
}
int main(void) {
  std::ios_base::sync_with_stdio(false);
  std::cin.tie(static_cast<std::ostream*>(nullptr));
  int n, m;
  bool flag;
  int i, bar_length;
  std::multimap<int, int> bars, aux;
  std::multimap<int, int>::iterator it;
  std::vector<std::pair<int, int> > nails;
  std::cin >> n >> m;
  nails.resize(n);
  for (i = 0; i < n; ++i) {
    std::cin >> nails[i].first >> nails[i].second;
  }
  for (i = 0; i < m; ++i) {
    std::cin >> bar_length;
    bars.insert(std::make_pair(bar_length, i + 1));
  }
  aux = bars;
  bar_length = d(nails[n - 1], nails[0]) + d(nails[0], nails[1]);
  if (aux.count(bar_length)) {
    flag = true;
    aux.erase(aux.find(bar_length));
    for (i = 2; i < n; i += 2) {
      bar_length = d(nails[i - 1], nails[i]) + d(nails[i], nails[i + 1]);
      if (aux.count(bar_length)) {
        aux.erase(aux.find(bar_length));
      } else {
        flag = false;
      }
    }
    if (flag) {
      std::cout << "YES" << std::endl;
      it = bars.find(d(nails[n - 1], nails[0]) + d(nails[0], nails[1]));
      std::cout << it->second << " -1 ";
      bars.erase(it);
      for (i = 2; i < n; i += 2) {
        it = bars.find(d(nails[i - 1], nails[i]) + d(nails[i], nails[i + 1]));
        std::cout << it->second << " -1 ";
        bars.erase(it);
      }
      return 0;
    }
  }
  aux = bars;
  bar_length = d(nails[n - 2], nails[n - 1]) + d(nails[n - 1], nails[0]);
  if (aux.count(bar_length)) {
    flag = true;
    aux.erase(aux.find(bar_length));
    for (i = 1; i < n - 1; i += 2) {
      bar_length = d(nails[i - 1], nails[i]) + d(nails[i], nails[i + 1]);
      if (aux.count(bar_length)) {
        aux.erase(aux.find(bar_length));
      } else {
        flag = false;
      }
    }
    if (flag) {
      std::cout << "YES" << std::endl;
      for (i = 1; i < n - 1; i += 2) {
        it = bars.find(d(nails[i - 1], nails[i]) + d(nails[i], nails[i + 1]));
        std::cout << "-1 " << it->second << " ";
        bars.erase(it);
      }
      it = bars.find(d(nails[n - 2], nails[n - 1]) + d(nails[n - 1], nails[0]));
      std::cout << "-1 " << it->second;
      bars.erase(it);
      return 0;
    }
  }
  std::cout << "NO" << std::endl;
  return 0;
}
