#include <bits/stdc++.h>
using namespace std;
struct p {
  int x;
  int y;
};
int n, m;
vector<p> mas;
vector<int> mas2;
vector<int> mas3;
bool ok = true;
vector<int> res;
int f(int i, int j, int k) {
  int r = -1;
  if (mas[i].x == mas[j].x && mas[i].y == mas[k].y) {
    return abs(mas[i].y - mas[j].y) + abs(mas[i].x - mas[k].x);
  }
  if (mas[i].y == mas[j].y && mas[i].x == mas[k].x) {
    return abs(mas[i].x - mas[j].x) + abs(mas[i].y - mas[k].y);
  }
  return r;
}
int main() {
  cin >> n >> m;
  mas.resize(n);
  for (int i = 0; i < n; i++) {
    cin >> mas[i].x >> mas[i].y;
  }
  mas2.resize(m);
  for (int i = 0; i < m; i++) {
    cin >> mas2[i];
  }
  mas3.resize(mas2.size());
  copy(mas2.begin(), mas2.end(), mas3.begin());
  res.assign(n, -1);
  for (int i = 0; i < n; i += 2) {
    int j = (i + 1) % n;
    int k = (i - 1 + n) % n;
    int l = 0;
    int l1 = f(i, j, k);
    if (l1 > 0) {
      l += l1;
    } else {
      ok = false;
    }
    int ind = -1;
    for (int i1 = 0; i1 < m; i1++) {
      if (mas2[i1] == l) {
        ind = i1;
        break;
      }
    }
    if (ind != -1) {
      res[i] = ind + 1;
      mas2[ind] = -1;
    } else {
      ok = false;
    }
  }
  if (ok) {
    cout << "YES" << endl;
    for (int i = 0; i < n; i++) {
      cout << res[i] << ' ';
    }
    cout << endl;
    return 0;
  } else {
    ok = true;
    res.assign(n, -1);
    copy(mas3.begin(), mas3.end(), mas2.begin());
    for (int i = 1; i < n; i += 2) {
      int j = (i + 1) % n;
      int k = (i - 1 + n) % n;
      int l = 0;
      int l1 = f(i, j, k);
      if (l1 > 0) {
        l += l1;
      } else {
        ok = false;
      }
      int ind = -1;
      for (int i1 = 0; i1 < m; i1++) {
        if (mas2[i1] == l) {
          ind = i1;
          break;
        }
      }
      if (ind != -1) {
        res[i] = ind + 1;
        mas2[ind] = -1;
      } else {
        ok = false;
      }
    }
    if (ok) {
      cout << "YES" << endl;
      for (int i = 0; i < n; i++) {
        cout << res[i] << ' ';
      }
      cout << endl;
      return 0;
    } else {
      cout << "NO" << endl;
    }
  }
  return 0;
}
