#include <bits/stdc++.h>
using namespace std;
int n, m, a1[510], a2[510];
int end1 = 0, end2 = 0;
double x[510], y[510], l[510], res1[510], res2[510];
string res = "YES";
bool was[510], truee = 0;
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 0; i < n; ++i) cin >> x[i] >> y[i];
  for (int i = 0; i < m; ++i) cin >> l[i];
  for (int i = 0; i < n - 2; ++i) {
    if (i % 2) {
      res1[end1] = sqrt((x[i] - x[i + 1]) * (x[i] - x[i + 1]) +
                        (y[i] - y[i + 1]) * (y[i] - y[i + 1]));
      res1[end1] += sqrt((x[i + 2] - x[i + 1]) * (x[i + 2] - x[i + 1]) +
                         (y[i + 2] - y[i + 1]) * (y[i + 2] - y[i + 1]));
      ++end1;
    }
    if (!(i % 2)) {
      res2[end2] = sqrt((x[i] - x[i + 1]) * (x[i] - x[i + 1]) +
                        (y[i] - y[i + 1]) * (y[i] - y[i + 1]));
      res2[end2] += sqrt((x[i + 2] - x[i + 1]) * (x[i + 2] - x[i + 1]) +
                         (y[i + 2] - y[i + 1]) * (y[i + 2] - y[i + 1]));
      ++end2;
    }
  }
  res1[end1] = sqrt((x[n - 1] - x[0]) * (x[n - 1] - x[0]) +
                    (y[n - 1] - y[0]) * (y[n - 1] - y[0]));
  res1[end1] +=
      sqrt((x[0] - x[1]) * (x[0] - x[1]) + (y[0] - y[1]) * (y[0] - y[1]));
  ++end1;
  res2[end2] = sqrt((x[n - 1] - x[n - 2]) * (x[n - 1] - x[n - 2]) +
                    (y[n - 1] - y[n - 2]) * (y[n - 1] - y[n - 2]));
  res2[end2] += sqrt((x[0] - x[n - 1]) * (x[0] - x[n - 1]) +
                     (y[0] - y[n - 1]) * (y[0] - y[n - 1]));
  ++end2;
  memset(was, 0, sizeof was);
  for (int i = 0; i < end1; ++i) {
    int j = 0;
    while (j < m && (l[j] != res1[i] || was[j] != 0)) ++j;
    if (j < m && (l[j] == res1[i] && was[j] == 0)) {
      ++was[j];
      a1[i] = j;
    }
    if (l[j] != res1[i]) res = "NO";
  }
  if (res == "NO") {
    memset(was, 0, sizeof was);
    res = "YES";
    for (int i = 0; i < end2; ++i) {
      int j = 0;
      while (j < m && (l[j] != res2[i] || was[j] != 0)) ++j;
      if (j < m && (l[j] == res2[i] && was[j] == 0)) {
        ++was[j];
        a2[i] = j;
      }
      if (l[j] != res2[i]) res = "NO";
    }
  } else
    ++truee;
  if (res == "NO")
    cout << res;
  else {
    cout << res << endl;
    int the = 0;
    if (truee) {
      cout << ++a1[end1 - 1] << " -1 ";
      for (int i = 0; i < n - 2; ++i)
        if (i % 2)
          cout << -1 << ' ';
        else {
          cout << ++a1[the] << ' ';
          ++the;
        }
    } else {
      for (int i = 0; i < n; ++i)
        if (!(i % 2))
          cout << -1 << ' ';
        else {
          cout << ++a2[the] << ' ';
          ++the;
        }
    }
  }
  return 0;
}
