#include <bits/stdc++.h>
struct Point {
  int xCordinate;
  int yCordinate;
};
struct D {
  int value = -1;
  std::vector<int> number;
  int numberOfValues = 0;
};
int distanceBetweenPoints(const Point a, const Point b) {
  const int xCordinateDiff = a.xCordinate - b.xCordinate;
  const int yCordinateDiff = a.yCordinate - b.yCordinate;
  const int distanceSquare =
      xCordinateDiff * xCordinateDiff + yCordinateDiff * yCordinateDiff;
  return (int)sqrt(distanceSquare);
}
void printD(D d) {
  std::cout << "value : " << d.value;
  std::cout << "number : ";
  for (int i = 0; i < d.number.size(); i++) {
    std::cout << d.number[i] << " ";
  }
  std::cout << std::endl;
  std::cout << "numberOfvalues : " << d.numberOfValues << std::endl;
}
int main() {
  int n, m;
  std::cin >> n >> m;
  Point points[n];
  for (int i = 0; i < n; i++) {
    int x, y;
    std::cin >> points[i].xCordinate >> points[i].yCordinate;
  }
  int rods[200001]{-1};
  D d[m];
  int minDistanceAllowed = 2000000;
  int maxDistanceAllowed = 0;
  int previousDistance = distanceBetweenPoints(points[n - 1], points[0]);
  for (int i = 0; i < n; i++) {
    int currentDistance = distanceBetweenPoints(points[i], points[(i + 1) % n]);
    if (currentDistance < minDistanceAllowed)
      minDistanceAllowed = currentDistance;
    if (maxDistanceAllowed < (currentDistance + previousDistance))
      maxDistanceAllowed = (currentDistance + previousDistance);
    previousDistance = currentDistance;
  }
  int validLength = 0;
  for (int i = 0; i < m; i++) {
    int temp;
    std::cin >> temp;
    if (temp <= minDistanceAllowed) continue;
    if (temp > maxDistanceAllowed) continue;
    bool flag = false;
    for (int j = 0; j < validLength; j++) {
      if (d[j].value == temp) {
        d[j].number.push_back(i + 1);
        flag = true;
        rods[temp] = j;
        break;
      }
    }
    if (flag == false) {
      d[validLength].value = temp;
      d[validLength].number.push_back(i + 1);
      rods[temp] = validLength;
      validLength++;
    }
  }
  int numberOfBentPositions = n / 2;
  int bentsDistance[numberOfBentPositions];
  for (int i = 0; i < numberOfBentPositions; i++) {
    bentsDistance[i] =
        distanceBetweenPoints(points[(2 * i) % n], points[(2 * i + 1) % n]) +
        distanceBetweenPoints(points[(2 * i + 1) % n], points[(2 * i + 2) % n]);
  }
  int results[n];
  for (int i = 0; i < n; i++) results[i] = -1;
  bool isSolved = true;
  for (int i = 0; i < numberOfBentPositions; i++) {
    int sizee = d[rods[bentsDistance[i]]].number.size();
    int indexInD = rods[bentsDistance[i]];
    if (indexInD >= 0 && d[indexInD].numberOfValues < sizee) {
      int xx = d[indexInD].number[d[indexInD].numberOfValues];
      d[indexInD].numberOfValues++;
      results[2 * i + 1] = xx;
    } else {
      isSolved = false;
      break;
    }
  }
  if (isSolved) {
    std::cout << "YES\n";
    for (int x : results) {
      std::cout << x << " ";
    }
    std::cout << std::endl;
    return 0;
  }
  for (int i = 0; i < m; i++) {
    d[i].numberOfValues = 0;
  }
  for (int i = 0; i < numberOfBentPositions; i++) {
    bentsDistance[i] =
        distanceBetweenPoints(points[(2 * i + 1) % n],
                              points[(2 * i + 2) % n]) +
        distanceBetweenPoints(points[(2 * i + 2) % n], points[(2 * i + 3) % n]);
  }
  for (int i = 0; i < n; i++) {
    results[i] = -1;
  }
  isSolved = true;
  for (int i = 0; i < numberOfBentPositions; i++) {
    int indexD = rods[bentsDistance[i]];
    if (indexD >= 0 && d[indexD].numberOfValues < d[indexD].number.size()) {
      int xx = d[indexD].number[d[indexD].numberOfValues];
      d[indexD].numberOfValues++;
      results[(2 * i + 2) % n] = xx;
    } else {
      isSolved = false;
      break;
    }
  }
  if (isSolved) {
    std::cout << "YES\n";
    for (int x : results) {
      std::cout << x << " ";
    }
    return 0;
  } else {
    std::cout << "NO" << std::endl;
  }
  return 0;
}
