Problem: There are m people living in a city. There are n dishes sold in the city. Each dish i has a price p_i, a standard s_i and a beauty b_i. Each person j has an income of inc_j and a preferred beauty pref_j. 

A person would never buy a dish whose standard is less than the person's income. Also, a person can't afford a dish with a price greater than the income of the person. In other words, a person j can buy a dish i only if p_i ≤ inc_j ≤ s_i.

Also, a person j can buy a dish i, only if |b_i-pref_j| ≤ (inc_j-p_i). In other words, if the price of the dish is less than the person's income by k, the person will only allow the absolute difference of at most k between the beauty of the dish and his/her preferred beauty. 

Print the number of dishes that can be bought by each person in the city.

Input

The first line contains two integers n and m (1 ≤ n ≤ 10^5, 1 ≤ m ≤ 10^5), the number of dishes available in the city and the number of people living in the city.

The second line contains n integers p_i (1 ≤ p_i ≤ 10^9), the price of each dish.

The third line contains n integers s_i (1 ≤ s_i ≤ 10^9), the standard of each dish.

The fourth line contains n integers b_i (1 ≤ b_i ≤ 10^9), the beauty of each dish.

The fifth line contains m integers inc_j (1 ≤ inc_j ≤ 10^9), the income of every person.

The sixth line contains m integers pref_j (1 ≤ pref_j ≤ 10^9), the preferred beauty of every person.

It is guaranteed that for all integers i from 1 to n, the following condition holds: p_i ≤ s_i.

Output

Print m integers, the number of dishes that can be bought by every person living in the city.

Examples

Input


3 3
2 1 3
2 4 4
2 1 1
2 2 3
1 2 4


Output


1 2 0 

Input


4 3
1 2 1 1
3 3 1 3
2 1 3 2
1 1 3
1 2 1


Output


0 2 3 

Note

In the first example, the first person can buy dish 2, the second person can buy dishes 1 and 2 and the third person can buy no dishes.

In the second example, the first person can buy no dishes, the second person can buy dishes 1 and 4, and the third person can buy dishes 1, 2 and 4.

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
using namespace std;
char I[4194304 + 1], *Is = I, *It = I;
inline char gc() {
  return Is == It ? ((It = (Is = I) + fread(I, 1, 4194304, stdin)) == I ? EOF
                                                                        : *Is++)
                  : *Is++;
}
inline int get() {
  int x = 0, o = 1;
  char c = gc();
  while (c < '-') c = gc();
  if (c == '-') o = -1, c = gc();
  while (c > 47) x = x * 10 + c - 48, c = gc();
  return x * o;
}
struct T {
  int x[3], d[3], k[3], l, r, id;
} t[100005];
int m, n, r, D, nx[3] = {1, 2, 0}, L, R, X, Y;
int p[100005], s[100005], b[100005], inc[100005], pre[100005], ans[100005],
    add[100005], out[100005];
inline bool cmp(T x, T y) { return x.k[D] < y.k[D]; }
void upd(int k) {
  if (t[k].l) {
    if (t[t[k].l].x[0] < t[k].x[0]) t[k].x[0] = t[t[k].l].x[0];
    if (t[t[k].l].x[1] < t[k].x[1]) t[k].x[1] = t[t[k].l].x[1];
    if (t[t[k].l].x[2] < t[k].x[2]) t[k].x[2] = t[t[k].l].x[2];
    if (t[t[k].l].d[0] > t[k].d[0]) t[k].d[0] = t[t[k].l].d[0];
    if (t[t[k].l].d[1] > t[k].d[1]) t[k].d[1] = t[t[k].l].d[1];
    if (t[t[k].l].d[2] > t[k].d[2]) t[k].d[2] = t[t[k].l].d[2];
  }
  if (t[k].r) {
    if (t[t[k].r].x[0] < t[k].x[0]) t[k].x[0] = t[t[k].r].x[0];
    if (t[t[k].r].x[1] < t[k].x[1]) t[k].x[1] = t[t[k].r].x[1];
    if (t[t[k].r].x[2] < t[k].x[2]) t[k].x[2] = t[t[k].r].x[2];
    if (t[t[k].r].d[0] > t[k].d[0]) t[k].d[0] = t[t[k].r].d[0];
    if (t[t[k].r].d[1] > t[k].d[1]) t[k].d[1] = t[t[k].r].d[1];
    if (t[t[k].r].d[2] > t[k].d[2]) t[k].d[2] = t[t[k].r].d[2];
  }
}
int build(int l, int r, int d) {
  int m = (l + r) >> 1;
  D = d;
  nth_element(t + l + 1, t + m + 1, t + r + 1, cmp);
  if (l != m) t[m].l = build(l, m - 1, nx[d]);
  if (r != m) t[m].r = build(m + 1, r, nx[d]);
  t[m].x[0] = t[m].d[0] = t[m].k[0];
  t[m].x[1] = t[m].d[1] = t[m].k[1];
  t[m].x[2] = t[m].d[2] = t[m].k[2];
  upd(m);
  return m;
}
void sol(int x) {
  if (t[x].x[0] >= L && t[x].d[0] <= R && t[x].x[1] >= X && t[x].x[2] >= Y) {
    ++add[x];
    return;
  }
  if (t[x].d[0] < L || t[x].x[0] > R || t[x].d[1] < X || t[x].d[2] < Y) return;
  if (t[x].k[0] >= L && t[x].k[0] <= R && t[x].k[1] >= X && t[x].k[2] >= Y)
    ++ans[x];
  if (t[x].l) sol(t[x].l);
  if (t[x].r) sol(t[x].r);
}
void dfs(int x) {
  ans[x] += add[x];
  if (t[x].l) add[t[x].l] += add[x], dfs(t[x].l);
  if (t[x].r) add[t[x].r] += add[x], dfs(t[x].r);
}
int main() {
  m = get();
  n = get();
  for (int i = 1; i <= m; ++i) p[i] = get();
  for (int i = 1; i <= m; ++i) s[i] = get();
  for (int i = 1; i <= m; ++i) b[i] = get();
  for (int i = 1; i <= n; ++i) inc[i] = get();
  for (int i = 1; i <= n; ++i) pre[i] = get();
  for (int i = 1; i <= n; ++i)
    t[i].k[0] = inc[i], t[i].k[1] = inc[i] + pre[i],
    t[i].k[2] = inc[i] - pre[i], t[i].id = i;
  r = build(1, n, 0);
  for (int i = 1; i <= m; ++i) {
    L = p[i], R = s[i], X = b[i] + p[i], Y = p[i] - b[i];
    sol(r);
  }
  dfs(r);
  for (int i = 1; i <= n; ++i) out[t[i].id] = ans[i];
  for (int i = 1; i < n; ++i) printf("%d ", out[i]);
  printf("%d\n", out[n]);
  return 0;
}