#include <bits/stdc++.h>
using namespace std;
struct point {
  int x, y;
  int has;
};
point p[555];
point s[555];
int main() {
  int n, m;
  cin >> n >> m;
  for (int i = 1; i <= n; i++) {
    cin >> p[i].x >> p[i].y;
    p[i].has = -1;
  }
  p[n + 1] = p[1];
  p[0] = p[n];
  for (int i = 0; i < m; i++) {
    int x;
    cin >> x;
    point add;
    add.x = x;
    add.y = i + 1;
    add.has = 0;
    s[i] = add;
  }
  bool can = true;
  for (int i = 2; i <= n; i += 2) {
    int len = abs(p[i].x - p[i - 1].x) + abs(p[i].x - p[i + 1].x) +
              abs(p[i].y - p[i - 1].y) + abs(p[i].y - p[i + 1].y);
    for (int u = 0; u < m; u++) {
      if (s[u].x == len && s[u].has == 0) {
        s[u].has = 1;
        p[i].has = u + 1;
        break;
      }
    }
    if (p[i].has == -1) {
      can = false;
      break;
    }
  }
  if (can) {
    cout << "YES" << endl;
    for (int i = 1; i <= n; i++) cout << p[i].has << ' ';
    return 0;
  }
  for (int i = 0; i <= n; i++) p[i].has = -1;
  for (int i = 0; i < m; i++) s[i].has = 0;
  can = true;
  for (int i = 1; i <= n; i += 2) {
    int len = abs(p[i].x - p[i - 1].x) + abs(p[i].x - p[i + 1].x) +
              abs(p[i].y - p[i - 1].y) + abs(p[i].y - p[i + 1].y);
    for (int u = 0; u < m; u++) {
      if (s[u].x == len && s[u].has == 0) {
        s[u].has = 1;
        p[i].has = u + 1;
        break;
      }
    }
    if (p[i].has == -1) {
      can = false;
      break;
    }
  }
  if (can) {
    cout << "YES" << endl;
    for (int i = 1; i <= n; i++) cout << p[i].has << ' ';
    return 0;
  }
  cout << "NO" << endl;
  return 0;
}
