#include <bits/stdc++.h>
using namespace std;
int abs(int x) { return x > 0 ? x : -x; }
struct node {
  int x;
  int y;
} a[10086];
int main() {
  int n, m, i, j, k, l, b[10086], mk[10086], ans[10086], temp;
  while (cin >> n >> m) {
    memset(ans, -1, sizeof(ans));
    memset(mk, 0, sizeof(mk));
    for (i = 1; i <= n; i++) {
      cin >> a[i].x >> a[i].y;
    }
    for (i = 1; i <= m; i++) {
      cin >> b[i];
    }
    int flag = 1;
    for (i = 1; i <= n - 1; i += 2) {
      if (flag == 0) {
        break;
      }
      if (i == 1) {
        temp = abs(a[i].x - a[n].x) + abs(a[i].y - a[n].y) +
               abs(a[i].x - a[i + 1].x) + abs(a[i].y - a[i + 1].y);
      } else {
        temp = abs(a[i].x - a[i - 1].x) + abs(a[i].y - a[i - 1].y) +
               abs(a[i].x - a[i + 1].x) + abs(a[i].y - a[i + 1].y);
      }
      for (j = 1; j <= m; j++) {
        if (b[j] == temp && mk[j] == 0) {
          ans[i] = j;
          mk[j] = 1;
          break;
        }
      }
      if (j == m + 1) {
        flag = 0;
      }
    }
    if (flag == 0) {
      flag = 1;
      memset(ans, -1, sizeof(ans));
      memset(mk, 0, sizeof(mk));
      for (i = 2; i <= n; i += 2) {
        if (flag == 0) {
          break;
        }
        if (i == n) {
          temp = abs(a[i].x - a[i - 1].x) + abs(a[i].y - a[i - 1].y) +
                 abs(a[i].x - a[1].x) + abs(a[i].y - a[1].y);
        } else {
          temp = abs(a[i].x - a[i - 1].x) + abs(a[i].y - a[i - 1].y) +
                 abs(a[i].x - a[i + 1].x) + abs(a[i].y - a[i + 1].y);
        }
        for (j = 1; j <= m; j++) {
          if (b[j] == temp && mk[j] == 0) {
            ans[i] = j;
            mk[j] = 1;
            break;
          }
        }
        if (j == m + 1) {
          flag = 0;
        }
      }
    }
    if (flag == 1) {
      printf("YES\n");
      for (i = 1; i <= n; i++) {
        printf("%d%c", ans[i], i == n ? '\n' : ' ');
      }
    } else {
      printf("NO\n");
    }
  }
}
