#include <bits/stdc++.h>
using namespace std;
int nailx[502], naily[502], rodlength[502], rodused[502];
bool used1[502] = {false}, used2[501] = {false};
int main() {
  int n, m, i, length, r;
  cin >> n >> m;
  for (i = 1; i <= n; i++) cin >> nailx[i] >> naily[i];
  for (i = 1; i <= m; i++) cin >> rodlength[i];
  for (i = n; i <= n; i++) {
    length = abs(nailx[i - 1] - nailx[i]) + abs(naily[i - 1] - naily[i]) +
             abs(nailx[i] - nailx[1]) + abs(naily[i] - naily[1]);
    for (r = 1; r <= m; r++) {
      if (!used1[r] && length == rodlength[r]) {
        used1[r] = true;
        rodused[i] = r;
        break;
      }
    }
    if (r > m) break;
  }
  if (i > n) {
    for (i = 2; i < n; i += 2) {
      length = abs(nailx[i - 1] - nailx[i]) + abs(naily[i - 1] - naily[i]) +
               abs(nailx[i] - nailx[i + 1]) + abs(naily[i] - naily[i + 1]);
      for (r = 1; r <= m; r++) {
        if (!used1[r] && length == rodlength[r]) {
          used1[r] = true;
          rodused[i] = r;
          break;
        }
      }
      if (r > m) break;
    }
  } else
    i = 1;
  if (i == n) {
    cout << "YES\n";
    for (r = 2; r <= n; r += 2) cout << "-1 " << rodused[r] << ' ';
    cout << '\n';
  } else {
    for (i = 1; i < 2; i += 2) {
      length = abs(nailx[n] - nailx[i]) + abs(naily[n] - naily[i]) +
               abs(nailx[i] - nailx[i + 1]) + abs(naily[i] - naily[i + 1]);
      for (r = 1; r <= m; r++) {
        if (!used2[r] && length == rodlength[r]) {
          used2[r] = true;
          rodused[i] = r;
          break;
        }
      }
      if (r > m) break;
    }
    if (i > 1) {
      for (; i < n; i += 2) {
        length = abs(nailx[i - 1] - nailx[i]) + abs(naily[i - 1] - naily[i]) +
                 abs(nailx[i] - nailx[i + 1]) + abs(naily[i] - naily[i + 1]);
        for (r = 1; r <= m; r++) {
          if (!used2[r] && length == rodlength[r]) {
            used2[r] = true;
            rodused[i] = r;
            break;
          }
        }
        if (r > m) break;
      }
    }
    if (i > n) {
      cout << "YES\n";
      for (r = 1; r < n; r += 2) cout << rodused[r] << " -1 ";
      cout << '\n';
    } else
      cout << "NO\n";
  }
  return 0;
}
