#include <bits/stdc++.h>
using namespace std;
set<pair<int, int> > dl;
set<pair<int, int> > dl2;
vector<int> ab;
vector<int> wyn;
int n, m;
int odl(int a, int b, int c, int d) {
  if (a == c) return abs(b - d);
  return abs(a - c);
}
bool go() {
  wyn.clear();
  int a, b, c, d;
  dl2 = dl;
  set<pair<int, int> >::iterator it;
  for (int i = 0; i <= (int)(n / 2) - 1; i++) {
    a = ab[2 * i] + ab[2 * i + 1];
    it = dl2.upper_bound(make_pair(a - 1, 100000000));
    if (it == dl2.end() || (*(it)).first != a) return 0;
    wyn.push_back((*(it)).second);
    dl2.erase(it);
  }
  return 1;
}
int main() {
  cin >> n >> m;
  wyn.clear();
  int a, b, c, d;
  int a1, b1, c1, d1;
  cin >> a >> b;
  a1 = a;
  b1 = b;
  for (int i = 0; i <= (int)(n - 1) - 1; i++) {
    cin >> c >> d;
    ab.push_back(odl(a, b, c, d));
    a = c;
    b = d;
  }
  ab.push_back(odl(a1, b1, a, b));
  for (int i = 0; i <= (int)(m)-1; i++) {
    cin >> a;
    dl.insert(make_pair(a, i + 1));
  }
  if (go()) {
    cout << "YES\n";
    for (int i = 0; i <= (int)(wyn.size()) - 1; i++) {
      cout << -1 << " " << wyn[i] << " ";
    }
  } else {
    int z = ab.back();
    ab.pop_back();
    reverse(ab.begin(), ab.end());
    ab.push_back(z);
    reverse(ab.begin(), ab.end());
    if (go()) {
      cout << "YES\n";
      for (int i = 0; i <= (int)(wyn.size()) - 1; i++) {
        cout << wyn[i] << " " << -1 << " ";
      }
    } else {
      cout << "NO";
    }
  }
  return 0;
}
