#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m;
  cin >> n >> m;
  pair<int, int> arr[n + 2];
  for (int i = 1; i <= n; i++) {
    int u, v;
    cin >> u >> v;
    arr[i] = {u, v};
  }
  arr[0] = arr[n];
  arr[n + 1] = arr[1];
  map<int, int> mp;
  map<int, set<int>> len;
  for (int i = 1; i <= m; i++) {
    int l;
    cin >> l;
    len[l].insert(i);
    mp[l] += 1;
  }
  map<int, int> req1;
  for (int i = 1; i <= n; i += 2) {
    int d1 = abs(arr[i].first - arr[i - 1].first) +
             abs(arr[i].second - arr[i - 1].second);
    int d2 = abs(arr[i].first - arr[i + 1].first) +
             abs(arr[i].second - arr[i + 1].second);
    req1[d1 + d2] += 1;
  }
  bool possible = true;
  for (auto x : req1) {
    if (mp[x.first] < x.second) {
      possible = false;
      break;
    }
  }
  if (possible) {
    cout << "YES" << endl;
    for (int i = 1; i <= n; i += 2) {
      int d1 = abs(arr[i].first - arr[i - 1].first) +
               abs(arr[i].second - arr[i - 1].second);
      int d2 = abs(arr[i].first - arr[i + 1].first) +
               abs(arr[i].second - arr[i + 1].second);
      cout << *(len[d1 + d2].begin()) << " " << -1 << " ";
      len[d1 + d2].erase(len[d1 + d2].begin());
    }
  } else {
    map<int, int> req2;
    for (int i = 2; i <= n; i += 2) {
      int d1 = abs(arr[i].first - arr[i - 1].first) +
               abs(arr[i].second - arr[i - 1].second);
      int d2 = abs(arr[i].first - arr[i + 1].first) +
               abs(arr[i].second - arr[i + 1].second);
      req2[d1 + d2] += 1;
    }
    possible = true;
    for (auto x : req2) {
      if (mp[x.first] < x.second) {
        possible = false;
        break;
      }
    }
    if (possible) {
      cout << "YES" << endl;
      for (int i = 2; i <= n; i += 2) {
        int d1 = abs(arr[i].first - arr[i - 1].first) +
                 abs(arr[i].second - arr[i - 1].second);
        int d2 = abs(arr[i].first - arr[i + 1].first) +
                 abs(arr[i].second - arr[i + 1].second);
        cout << -1 << " " << *(len[d1 + d2].begin()) << " ";
        len[d1 + d2].erase(len[d1 + d2].begin());
      }
    } else {
      cout << "NO";
    }
  }
}
