#include <bits/stdc++.h>
using namespace std;
const int MAXN = 505;
int n, m;
struct nail {
  int x, y;
} a[MAXN];
int len[MAXN];
int vis[MAXN];
int ans[MAXN];
int judge(int i, int j) {
  return len[j] == ((abs(a[i - 1].x - a[i].x) + abs(a[i - 1].y - a[i].y)) +
                    (abs(a[i + 1].x - a[i].x) + abs(a[i + 1].y - a[i].y)));
}
void print() {
  int i;
  puts("YES");
  for (i = 1; i <= n; i++) {
    if (i == 1)
      printf("%d", (ans[i] ? ans[i] : -1));
    else
      printf(" %d", (ans[i] ? ans[i] : -1));
  }
}
int main() {
  int i, j;
  int flag, t = 0;
  memset(vis, 0, sizeof(vis));
  memset(ans, 0, sizeof(ans));
  scanf("%d%d", &n, &m);
  for (i = 1; i <= n; i++) scanf("%d%d", &a[i].x, &a[i].y);
  for (i = 1; i <= m; i++) scanf("%d", &len[i]);
  a[0].x = a[n].x;
  a[0].y = a[n].y;
  a[n + 1].x = a[1].x;
  a[n + 1].y = a[1].y;
  for (i = 1; i <= n; i += 2) {
    flag = 0;
    for (j = 1; j <= m; j++) {
      if (!vis[j] && judge(i, j)) {
        flag = 1;
        vis[j] = 1;
        ans[i] = j;
        break;
      }
    }
    if (!flag) {
      t = 1;
      break;
    }
  }
  if (!t) {
    print();
  } else {
    memset(vis, 0, sizeof(vis));
    memset(ans, 0, sizeof(ans));
    for (i = 2; i <= n; i += 2) {
      flag = 0;
      for (j = 1; j <= m; j++) {
        if (!vis[j] && judge(i, j)) {
          flag = 1;
          vis[j] = 1;
          ans[i] = j;
          break;
        }
      }
      if (!flag) {
        printf("NO\n");
        return 0;
      }
    }
    print();
  }
  return 0;
}
