#include <bits/stdc++.h>
using namespace std;
const double epsilon = 1e-7;
void add(int &A, int B, int MOD) { A = (A + B) % MOD; }
int distanceLine(pair<int, int> A, pair<int, int> B) {
  return abs(A.first - B.first) + abs(A.second - B.second);
}
vector<pair<int, int> > points;
vector<vector<stack<int> > > pods(2);
int N, M;
bool ican(int st) {
  int i, w = st, prev, nex, dist;
  vector<int> sol(N, -1);
  i = st;
  if (i == 0) {
    prev = N - 1;
    nex = 1;
    dist = distanceLine(points[i], points[prev]) +
           distanceLine(points[i], points[nex]);
    if (int((pods[w][dist]).size()) == 0) {
      return false;
    } else {
      sol[i] = pods[w][dist].top();
      pods[w][dist].pop();
    }
    i += 2;
  }
  for (; i < N - 1; i += 2) {
    prev = i - 1;
    nex = i + 1;
    dist = distanceLine(points[i], points[prev]) +
           distanceLine(points[i], points[nex]);
    if (int((pods[w][dist]).size()) == 0) {
      return false;
    } else {
      sol[i] = pods[w][dist].top();
      pods[w][dist].pop();
    }
  }
  if (w == 1) {
    i = N - 1;
    prev = i - 1;
    nex = 0;
    dist = distanceLine(points[i], points[prev]) +
           distanceLine(points[i], points[nex]);
    if (int((pods[w][dist]).size()) == 0) {
      return false;
    } else {
      sol[i] = pods[w][dist].top();
      pods[w][dist].pop();
    }
  }
  printf("YES\n");
  for (auto x : sol) {
    printf("%d ", x);
  }
  return true;
}
int main() {
  int i, x;
  scanf("%d %d", &N, &M);
  points.resize(N);
  pods[0].resize(200001);
  pods[1].resize(200001);
  for (i = 0; i < N; ++i) {
    scanf("%d %d", &points[i].first, &points[i].second);
  }
  for (i = 0; i < M; ++i) {
    scanf("%d", &x);
    pods[0][x].push(i + 1);
    pods[1][x].push(i + 1);
  }
  if (!(ican(0) || ican(1))) {
    printf("NO\n");
  }
  return 0;
}
