#include <bits/stdc++.h>
using namespace std;
int n, m;
int x[505], y[505];
int line[505];
int who[505], used[505];
int main() {
  cin >> n >> m;
  for (int i = 0; i < n; i++) scanf("%d %d", &x[i], &y[i]);
  for (int i = 0; i < m; i++) scanf("%d", &line[i]);
  memset(who, -1, sizeof who);
  memset(used, false, sizeof used);
  bool puede = true;
  for (int i = 0; i < n; i += 2) {
    int ante = (i - 1 + n) % n;
    int d = abs(x[ante] - x[i]) + abs(y[ante] - y[i]) +
            abs(x[(i + 1) % n] - x[i]) + abs(y[(i + 1) % n] - y[i]);
    int index = -1;
    for (int j = 0; j < m; j++)
      if (!used[j] && d == line[j]) {
        index = j;
        break;
      }
    if (index == -1) {
      puede = false;
      break;
    }
    used[index] = true;
    who[i] = index + 1;
  }
  if (puede) {
    cout << "YES" << endl;
    for (int i = 0; i < n; i++) printf("%d%c", who[i], i + 1 == n ? '\n' : ' ');
    return 0;
  }
  puede = true;
  memset(who, -1, sizeof who);
  memset(used, false, sizeof used);
  for (int i = 1; i < n; i += 2) {
    int ante = (i - 1 + n) % n;
    int d = abs(x[ante] - x[i]) + abs(y[ante] - y[i]) +
            abs(x[(i + 1) % n] - x[i]) + abs(y[(i + 1) % n] - y[i]);
    int index = -1;
    for (int j = 0; j < m; j++)
      if (!used[j] && d == line[j]) {
        index = j;
        break;
      }
    if (index == -1) {
      puede = false;
      break;
    }
    used[index] = true;
    who[i] = index + 1;
  }
  if (puede) {
    cout << "YES" << endl;
    for (int i = 0; i < n; i++) printf("%d%c", who[i], i + 1 == n ? '\n' : ' ');
    return 0;
  } else
    cout << "NO" << endl;
}
