#include <bits/stdc++.h>
using namespace std;
struct pt {
  int xx, yy;
} nl[505];
int n, m;
bool fl = true;
int ans[505];
vector<int> rd[40005];
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 0; i < n; i++) {
    scanf("%d%d", &nl[i].xx, &nl[i].yy);
  }
  for (int i = 0; i < m; i++) {
    int a;
    scanf("%d", &a);
    if (a > 40000) continue;
    rd[a].push_back(i);
  }
  int cl;
  memset(ans, -1, sizeof(ans));
  for (int i = 0; i < n - 1; i += 2) {
    cl = int(abs(nl[i + 1].xx - nl[i].xx)) + int(abs(nl[i + 1].yy - nl[i].yy)) +
         int(abs(nl[(i - 1 + n) % n].xx - nl[i].xx)) +
         int(abs(nl[(i - 1 + n) % n].yy - nl[i].yy));
    if (rd[cl].size() == 0) {
      fl = false;
      break;
    }
    ans[i] = rd[cl][rd[cl].size() - 1] + 1;
    rd[cl].pop_back();
    if (i == n - 2) break;
  }
  if (fl) {
    printf("YES\n");
    for (int i = 0; i < n; i++) {
      printf("%d ", ans[i]);
    }
    return 0;
  }
  fl = true;
  memset(ans, -1, sizeof(ans));
  for (int i = 1; i < n; i += 2) {
    cl = int(abs(nl[(i + 1) % n].xx - nl[i].xx)) +
         int(abs(nl[(i + 1) % n].yy - nl[i].yy)) +
         int(abs(nl[i - 1].xx - nl[i].xx)) + int(abs(nl[i - 1].yy - nl[i].yy));
    if (rd[cl].size() == 0) {
      fl = false;
      break;
    }
    ans[i] = rd[cl][rd[cl].size() - 1] + 1;
    rd[cl].pop_back();
    if (i == n - 1) break;
  }
  if (fl) {
    printf("YES\n");
    for (int i = 0; i < n; i++) {
      printf("%d ", ans[i]);
    }
  } else {
    printf("NO\n");
  }
  return 0;
}
