Problem: Robot Bender decided to make Fray a birthday present. He drove n nails and numbered them from 1 to n in some order. Bender decided to make a picture using metal rods. The picture is a closed polyline, which vertices should be nails (in the given order). The segments of the polyline should be parallel to the coordinate axes. Polyline is allowed to have self-intersections. Bender can take a rod and fold it exactly once in any place to form an angle of 90 degrees. Then he can attach the place of the fold to some unoccupied nail and attach two ends of this rod to adjacent nails. A nail is considered unoccupied if there is no rod attached to it (neither by it's end nor the by the fold place). No rod could be used twice. It is not required to use all the rods.

Help Bender to solve this difficult task.

Input

The first line contains two positive integers n and m (4 ≤ n ≤ 500, 2 ≤ m ≤ 500, n is even) — the amount of nails and the amount of rods. i-th of the following n lines contains a pair of integers, denoting the coordinates of the i-th nail. Nails should be connected in the same order as they are given in the input. The last line contains m integers — the lenghts of the rods. All coordinates do not exceed 104 by absolute value. Lengths of the rods are between 1 and 200 000. No rod can be used twice. It is guaranteed that all segments of the given polyline are parallel to coordinate axes. No three consecutive nails lie on the same line.

Output

If it is impossible to solve Bender's problem, output NO. Otherwise, output YES in the first line, and in the second line output n numbers — i-th of them should be the number of rod, which fold place is attached to the i-th nail, or -1, if there is no such rod.

If there are multiple solutions, print any of them.

Examples

Input

4 2
0 0
0 2
2 2
2 0
4 4


Output

YES
1 -1 2 -1 


Input

6 3
0 0
1 0
1 1
2 1
2 2
0 2
3 2 3


Output

YES
1 -1 2 -1 3 -1 


Input

6 3
0 0
1 0
1 1
2 1
2 2
0 2
2 2 3


Output

NO

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;
template <class T>
void splitstr(const string &s, vector<T> &out) {
  istringstream in(s);
  out.clear();
  copy(istream_iterator<T>(in), istream_iterator<T>(), back_inserter(out));
}
template <class T>
void initArray(T *arr, int size, T value) {
  for (int i = 0; i < size; i++) {
    arr[i] = value;
  }
}
template <class T>
T readValue(string s) {
  T result;
  istringstream sin(s);
  sin >> result;
  return result;
}
template <class T>
inline T gcd(T a, T b) {
  return (!a) ? b : gcd(b % a, a);
}
template <class T>
inline T mod(T a, T p) {
  a %= p;
  return (a < 0) ? a + p : a;
}
template <class T>
inline T numbits(T n) {
  return (!n) ? 0 : 1 + numbits(n & (n - 1));
}
template <class T>
inline T inverse(T a, T m) {
  a = mod<T>(a, m);
  return (a == 1) ? 1 : mod<T>((1 - m * inverse<T>(m % a, a)) / a, m);
}
template <class T>
inline bool isPrime(T a) {
  T lim = (T)sqrt((double)a);
  for (T i = 2; i < lim; i++)
    if (a % i == 0) return false;
  return true;
}
template <class T>
inline T power(T a, T p, T mod) {
  if (!p) return 1;
  T temp = power(a, p >> 1, mod);
  temp = (temp * temp) % mod;
  if (p & 1) temp = (temp * a) % mod;
  return temp;
}
void get_primes(int start, int end, vector<int> &vi) {
  int *p = new int[end + 1];
  initArray<int>(p, end + 1, 0);
  p[1] = 1;
  for (int i = 2; i <= end; i++) {
    if (!p[i]) {
      if (i >= start) vi.push_back(i);
      for (int j = 2 * i; j <= end; j += i) p[j] = 1;
    }
  }
}
bool dfs(int current, int final, int total, int *visited, int **edges,
         bool flow) {
  if (current == final) return true;
  if (visited[current]) return false;
  visited[current] = true;
  for (int i = 0; i < total; i++)
    if (edges[current][i] && dfs(i, final, total, visited, edges, flow)) {
      if (flow) {
        edges[current][i]--;
        edges[i][current]++;
      }
      return true;
    }
  return false;
}
int flow(int in, int out, int total, int **edges) {
  int result = 0;
  int *visited = new int[total];
  while (initArray<int>(visited, total, 0),
         dfs(in, out, total, visited, edges, true))
    result++;
  return result;
}
void create_set(int x, int *P, int *rank) {
  P[x] = x;
  rank[x] = 0;
}
int find_set(int x, int *P) {
  if (x != P[x]) P[x] = find_set(P[x], P);
  return P[x];
}
bool merge_sets(int x, int y, int *P, int *rank) {
  int Px = find_set(x, P);
  int Py = find_set(y, P);
  if (Px == Py) return false;
  if (rank[Px] > rank[Py])
    P[Py] = Px;
  else
    P[Px] = Py;
  if (rank[Px] == rank[Py]) rank[Py]++;
  return true;
}
int read_cum_freq(int index, int *tree) {
  int sum = 0;
  while (index) {
    sum += tree[index];
    index -= (index & -index);
  }
  return sum;
}
void upd_freq(int index, int mxIndex, int value, int *tree) {
  while (index <= mxIndex) {
    tree[index] += value;
    index += (index & -index);
  }
}
int read_freq(int index, int *tree) {
  return read_cum_freq(index, tree) - read_cum_freq(index - 1, tree);
}
void build_failure_function(const string &str, int *temp_arr) {
  temp_arr[0] = temp_arr[1] = 0;
  for (int i = 2; i <= static_cast<int>(str.size()); i++) {
    temp_arr[i] = -1;
    for (int ind = temp_arr[i - 1]; temp_arr[i] == -1; ind = temp_arr[ind]) {
      if (str[ind] == str[i - 1]) {
        temp_arr[i] = ind + 1;
      } else if (ind == 0) {
        temp_arr[i] = 0;
      }
    }
  }
}
void KMP(const string &s1, const string &s2, int *res) {
  int *temp_arr = new int[s2.size() + 1];
  build_failure_function(s2, temp_arr);
  int i = 0;
  int ind = 0;
  while (i < static_cast<int>(s1.size())) {
    if (s1[i] == s2[ind]) {
      res[i] = ++ind;
      if (res[i] == s2.size()) {
        ind = temp_arr[ind - 1];
      }
      i++;
    } else if (ind == 0) {
      res[i++] = 0;
    } else {
      ind = temp_arr[ind];
    }
  }
  delete[] temp_arr;
}
FILE *stream1, *stream2;
void setup(int value) {
  freopen("in.txt", "r", stdin);
  if (value) {
    freopen("out.txt", "w", stdout);
  }
}
int main() {
  int n, m;
  cin >> n >> m;
  vector<pair<int, int> > coords;
  for (int i = 0; i < n; i++) {
    int x, y;
    cin >> x >> y;
    coords.push_back(std::make_pair(x, y));
  }
  vector<int> len;
  for (int i = 0; i < m; i++) {
    int ln;
    cin >> ln;
    len.push_back(ln);
  }
  if (n & 1) {
    std::cout << "NO" << std::endl;
    return 0;
  }
  for (int start = 0; start < 2; start++) {
    vector<int> temp_len = len;
    vector<int> result;
    for (int i = start; i < n; i += 2) {
      int prev = (i + n - 1) % n;
      int next = (i + 1) % n;
      int dist = abs(coords[i].first - coords[prev].first) +
                 abs(coords[i].first - coords[next].first) +
                 abs(coords[i].second - coords[prev].second) +
                 abs(coords[i].second - coords[next].second);
      for (int j = 0; j < temp_len.size(); j++) {
        if (temp_len[j] == dist) {
          if (!start) {
            result.push_back(j + 1);
            result.push_back(-1);
          } else {
            result.push_back(-1);
            result.push_back(j + 1);
          }
          temp_len[j] = -1;
          break;
        }
      }
      if (result.size() == n) {
        std::cout << "YES\n";
        for (int i = 0; i < result.size(); i++) std::cout << result[i] << " ";
        std::cout << std::endl;
        return 0;
      }
    }
  }
  std::cout << "NO" << std::endl;
  return 0;
}