#include <bits/stdc++.h>
using namespace std;
int loc[502][2];
vector<int> lengths[200001];
vector<int> length[200001];
int n, m;
int main(void) {
  scanf("%d %d", &n, &m);
  for (int i = 0; i < n; i++) scanf("%d %d", loc[i], loc[i] + 1);
  loc[n][0] = loc[0][0], loc[n][1] = loc[0][1];
  for (int i = 0; i < m; i++) {
    int temp;
    scanf("%d", &temp);
    lengths[temp].push_back(i + 1);
    length[temp].push_back(i + 1);
  }
  vector<int> ansList;
  bool isAns = true;
  for (int i = 0; i < n; i += 2) {
    int req = abs((double)loc[i][0] - loc[i + 1][0]) +
              abs((double)loc[i][1] - loc[i + 1][1]) +
              abs((double)loc[i + 2][0] - loc[i + 1][0]) +
              abs((double)loc[i + 2][1] - loc[i + 1][1]);
    if (lengths[req].size() == 0) {
      isAns = false;
      break;
    }
    ansList.push_back(lengths[req][lengths[req].size() - 1]);
    lengths[req].pop_back();
  }
  if (isAns) {
    printf("YES\n");
    for (int i = 0; i < ansList.size(); i++) printf("-1 %d ", ansList[i]);
    return 0;
  }
  isAns = true;
  ansList.clear();
  for (int i = -1; i < n - 1; i += 2) {
    int ti = i;
    if (ti < 0) ti = n - 1;
    int req = abs((double)loc[ti][0] - loc[i + 1][0]) +
              abs((double)loc[ti][1] - loc[i + 1][1]) +
              abs((double)loc[i + 2][0] - loc[i + 1][0]) +
              abs((double)loc[i + 2][1] - loc[i + 1][1]);
    if (length[req].size() == 0) {
      isAns = false;
      break;
    }
    ansList.push_back(length[req][length[req].size() - 1]);
    length[req].pop_back();
  }
  if (isAns) {
    printf("YES\n");
    for (int i = 0; i < ansList.size(); i++) printf("%d -1 ", ansList[i]);
  } else
    printf("NO\n");
  return 0;
}
