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>
using namespace std;
inline int read() {
  int res = 0;
  bool bo = 0;
  char c;
  while (((c = getchar()) < '0' || c > '9') && c != '-')
    ;
  if (c == '-')
    bo = 1;
  else
    res = c - 48;
  while ((c = getchar()) >= '0' && c <= '9')
    res = (res << 3) + (res << 1) + (c - 48);
  return bo ? ~res + 1 : res;
}
const int N = 1e5 + 5, M = N << 2;
int n, m, p[N], s[N], b[N], inc[N], pref[N], tot, a[M], A[M], B[M], cnt, ans[N];
struct node {
  int tm, x, y, op, id;
} que[M];
inline bool comp(node a, node b) {
  return a.tm < b.tm || (a.tm == b.tm && a.op < b.op);
}
void changeA(int x, int v) {
  for (; x <= tot; x += x & -x) A[x] += v;
}
int askA(int x) {
  int res = 0;
  for (; x; x -= x & -x) res += A[x];
  return res;
}
void changeB(int x, int v) {
  for (; x <= tot; x += x & -x) B[x] += v;
}
int askB(int x) {
  int res = 0;
  for (; x; x -= x & -x) res += B[x];
  return res;
}
int main() {
  n = read();
  m = read();
  for (int i = 1; i <= n; i++) p[i] = read();
  for (int i = 1; i <= n; i++) s[i] = read();
  for (int i = 1; i <= n; i++) b[i] = read();
  for (int i = 1; i <= m; i++) inc[i] = read();
  for (int i = 1; i <= m; i++) pref[i] = read();
  for (int i = 1; i <= n; i++)
    a[++tot] = p[i] + b[i], a[++tot] = b[i] - p[i] + 1;
  for (int i = 1; i <= m; i++)
    a[++tot] = inc[i] + pref[i], a[++tot] = pref[i] - inc[i];
  std::sort(a + 1, a + tot + 1);
  int tt = std::unique(a + 1, a + tot + 1) - a - 1;
  tot = tt;
  for (int i = 1; i <= n; i++)
    que[++cnt] = (node){p[i], p[i], b[i], 1, 0},
    que[++cnt] = (node){s[i] + 1, p[i], b[i], -1, 0};
  for (int i = 1; i <= m; i++)
    que[++cnt] = (node){inc[i], inc[i], pref[i], 2, i};
  std::sort(que + 1, que + cnt + 1, comp);
  for (int i = 1; i <= cnt; i++)
    if (que[i].op <= 1) {
      changeA(std::lower_bound(a + 1, a + tot + 1, que[i].x + que[i].y) - a,
              que[i].op);
      changeB(std::lower_bound(a + 1, a + tot + 1, que[i].y - que[i].x + 1) - a,
              que[i].op);
    } else
      ans[que[i].id] =
          askA(std::lower_bound(a + 1, a + tot + 1, que[i].x + que[i].y) - a) -
          askB(std::lower_bound(a + 1, a + tot + 1, que[i].y - que[i].x) - a);
  for (int i = 1; i <= m; i++) printf("%d ", ans[i]);
  return puts(""), 0;
}