#include <bits/stdc++.h>
using namespace std;
const int maxn = 507;
pair<int, int> td[maxn];
int n, m, p[80007], ans[maxn];
vector<int> a[80007];
bool ok;
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 1, _c = n; i <= _c; i++)
    scanf("%d%d", &td[i].first, &td[i].second);
  int v;
  for (int i = 1, _c = m; i <= _c; i++) {
    scanf("%d", &v);
    if (v > 80000) continue;
    a[v].push_back(i);
  }
  td[0] = td[n];
  td[n + 1] = td[1];
  memset(ans, 0, sizeof(ans));
  ok = 1;
  for (int i = 1; i < n; i += 2) {
    v = abs(td[i].first - td[i - 1].first) +
        abs(td[i].first - td[i + 1].first) +
        abs(td[i].second - td[i - 1].second) +
        abs(td[i].second - td[i + 1].second);
    if (v <= 80000 && p[v] < int(a[v].size()))
      ans[i] = a[v][p[v]++];
    else {
      ok = 0;
      break;
    }
  }
  if (!ok) {
    ok = 1;
    memset(ans, 0, sizeof(ans));
    memset(p, 0, sizeof(p));
    for (int i = 2; i <= n; i += 2) {
      v = abs(td[i].first - td[i - 1].first) +
          abs(td[i].first - td[i + 1].first) +
          abs(td[i].second - td[i - 1].second) +
          abs(td[i].second - td[i + 1].second);
      if (v <= 80000 && p[v] < int(a[v].size()))
        ans[i] = a[v][p[v]++];
      else {
        ok = 0;
        break;
      }
    }
  }
  if (ok) {
    puts("YES");
    for (int i = 1, _c = n; i <= _c; i++)
      if (ans[i])
        printf("%d ", ans[i]);
      else
        printf("-1 ");
    puts("");
  } else
    puts("NO");
  return 0;
}
