#include <bits/stdc++.h>
using namespace std;
template <class A, class B>
A cvt(B x) {
  stringstream s;
  s << x;
  A r;
  s >> r;
  return r;
}
typedef vector<int> VI;
typedef vector<pair<int, int> > VII;
typedef vector<string> VS;
int t[550][2];
int rods1[2][200100];
list<int> rods2[2][200100];
int main() {
  int n, m, x, y;
  scanf("%d%d", &n, &m);
  VI len(n);
  for (int i = (int)0; i < (int)n; ++i) {
    cin >> t[i][0] >> t[i][1];
    if (i) {
      int j = (i - 1);
      len[i] = abs(t[i][0] - t[j][0]) + abs(t[i][1] - t[j][1]);
    }
  }
  len[0] = abs(t[0][0] - t[n - 1][0]) + abs(t[0][1] - t[n - 1][1]);
  bool possible = true;
  for (int i = (int)0; i < (int)m; ++i) {
    scanf("%d", &x);
    for (int j = (int)0; j < (int)2; ++j) {
      rods1[j][x]++;
      rods2[j][x].push_back(i + 1);
    }
  }
  int answer[n];
  for (int j = (int)0; j < (int)2; ++j) {
    memset(answer, -1, sizeof answer);
    for (int i = (int)j; i < (int)n + j; ++i) {
      int t1 = len[i] + len[(++i) % n];
      if (rods1[j][t1] > 0) {
        rods1[j][t1]--;
        answer[i - 1] = rods2[j][t1].front();
        rods2[j][t1].pop_front();
      } else {
        possible = false;
      }
    }
    if (possible) break;
    if (!j) possible = true;
  }
  if (possible) {
    puts("YES");
    for (int i = 0; i < n; ++i) {
      printf("%d%c", answer[i], i == n - 1 ? 10 : 32);
    }
  } else
    puts("NO");
  return 0;
}
