#include <bits/stdc++.h>
using namespace std;
const int Inf = 0x3f3f3f3f;
int x[505], y[505], a[505];
vector<int> r[200002], s[200002];
inline int abs(int x) { return x >= 0 ? x : -x; }
int dist(int i, int j) { return abs(x[i] - x[j]) + abs(y[i] - y[j]); }
int main() {
  int n, m, i;
  scanf("%d %d", &n, &m);
  for (i = 1; i <= n; ++i) scanf("%d %d", &x[i], &y[i]);
  x[n + 1] = x[1];
  y[n + 1] = y[1];
  x[n + 2] = x[2];
  y[n + 2] = y[2];
  for (i = 1; i <= m; ++i) {
    int len;
    scanf("%d", &len);
    r[len].push_back(i);
  }
  for (i = 0; i < 200002; ++i) s[i] = r[i];
  bool ok = true;
  memset(a, -1, sizeof(a));
  for (i = 1; i < n; i += 2) {
    int len = dist(i, i + 1) + dist(i + 1, i + 2);
    if (r[len].empty()) {
      ok = false;
      break;
    }
    a[i + 1] = r[len].back();
    r[len].pop_back();
  }
  if (!ok) {
    ok = true;
    for (i = 0; i < 200002; ++i) r[i] = s[i];
    memset(a, -1, sizeof(a));
    for (i = 2; i <= n; i += 2) {
      int len = dist(i, i + 1) + dist(i + 1, i + 2);
      if (r[len].empty()) {
        ok = false;
        break;
      }
      a[i + 1] = r[len].back();
      r[len].pop_back();
    }
    a[1] = a[n + 1];
  }
  if (!ok)
    printf("NO\n");
  else {
    printf("YES\n");
    for (i = 1; i <= n; ++i) printf("%d ", a[i]);
  }
  return 0;
}
