#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:136777216")
using namespace std;
int n, m;
int a[555], x[555], y[555];
map<int, int> c;
bool good(int s) {
  vector<int> need;
  for (int i = s; i < n; i += 2) {
    int d = abs(x[i] - x[(i + n - 1) % n]) + abs(y[i] - y[(i + n - 1) % n]) +
            abs(x[i] - x[i + 1]) + abs(y[i] - y[i + 1]);
    need.push_back(d);
  }
  c.clear();
  for (int i(0); i < (m); i++) c[a[i]]++;
  for (int i(0); i < (need.size()); i++) {
    int d = need[i];
    if (c[d] == 0) return 0;
    c[d]--;
  }
  puts("YES");
  for (int i(0); i < (n); i++) {
    if (i) printf(" ");
    if ((i - s) % 2)
      printf("-1");
    else {
      int d = need[(i - s) / 2];
      for (int j(0); j < (m); j++)
        if (a[j] == d) {
          a[j] = -1;
          printf("%d", j + 1);
          break;
        }
    }
  }
  puts("");
  return 1;
}
int main() {
  cin >> n >> m;
  for (int i(0); i < (n); i++) scanf("%d %d", x + i, y + i);
  x[n] = x[0];
  y[n] = y[0];
  for (int i(0); i < (m); i++) scanf("%d", a + i);
  for (int i(0); i < (2); i++) {
    if (good(i)) {
      return 0;
    }
  }
  puts("NO");
  return 0;
}
