#include <bits/stdc++.h>
using namespace std;
static const int MAXN = 500 + 10;
static const double EPS = 1e-10;
struct Point {
  int x, y;
  void input() { scanf("%d%d", &x, &y); }
} point[MAXN];
int seg[MAXN];
bool vis[MAXN];
int ans[MAXN];
int n, m;
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= n; i++) point[i].input();
  point[0].x = point[n].x;
  point[0].y = point[n].y;
  point[n + 1].x = point[1].x;
  point[n + 1].y = point[1].y;
  for (int i = 1; i <= m; i++) scanf("%d", &seg[i]);
  bool flag = true;
  for (int i = 1; i <= n; i += 2) {
    double dis =
        sqrt((point[i].x - point[i - 1].x) * (point[i].x - point[i - 1].x) +
             (point[i].y - point[i - 1].y) * (point[i].y - point[i - 1].y)) +
        sqrt((point[i].x - point[i + 1].x) * (point[i].x - point[i + 1].x) +
             (point[i].y - point[i + 1].y) * (point[i].y - point[i + 1].y));
    for (int j = 1; j <= m; j++) {
      if (!vis[j] && fabs(dis - seg[j]) < EPS) {
        vis[j] = true;
        ans[i] = j;
        break;
      }
      if (j == m) flag = false;
    }
  }
  if (!flag) {
    flag = true;
    memset(vis, 0, sizeof(vis));
    memset(ans, 0, sizeof(ans));
    for (int i = 2; i <= n; i += 2) {
      double dis =
          sqrt((point[i].x - point[i - 1].x) * (point[i].x - point[i - 1].x) +
               (point[i].y - point[i - 1].y) * (point[i].y - point[i - 1].y)) +
          sqrt((point[i].x - point[i + 1].x) * (point[i].x - point[i + 1].x) +
               (point[i].y - point[i + 1].y) * (point[i].y - point[i + 1].y));
      for (int j = 1; j <= m; j++) {
        if (!vis[j] && fabs(dis - seg[j]) < EPS) {
          vis[j] = true;
          ans[i] = j;
          break;
        }
        if (j == m) flag = false;
      }
    }
  }
  if (flag) {
    puts("YES");
    for (int i = 1; i <= n; i++) printf("%d ", ans[i] ? ans[i] : -1);
  } else
    puts("NO");
  return 0;
}
