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;
template <typename T>
void maxtt(T& t1, T t2) {
  t1 = max(t1, t2);
}
template <typename T>
void mintt(T& t1, T t2) {
  t1 = min(t1, t2);
}
bool debug = 0;
int n, m, k;
int dx[4] = {0, 1, 0, -1}, dy[4] = {1, 0, -1, 0};
string direc = "URDL";
long long ln, lk, lm;
void etp(bool f = 0) {
  puts(f ? "YES" : "NO");
  exit(0);
}
void addmod(int& x, int y, int mod = 1000000007) {
  assert(y >= 0);
  x += y;
  if (x >= mod) x -= mod;
  assert(x >= 0 && x < mod);
}
void et(int x = -1) {
  printf("%d\n", x);
  exit(0);
}
long long fastPow(long long x, long long y, int mod = 1000000007) {
  long long ans = 1;
  while (y > 0) {
    if (y & 1) ans = (x * ans) % mod;
    x = x * x % mod;
    y >>= 1;
  }
  return ans;
}
long long gcd1(long long x, long long y) { return y ? gcd1(y, x % y) : x; }
int p[200135], s[200135], b[200135], inc[200135], pref[200135];
int A[200135], B[200135], bcnt, N, ans[200135];
vector<pair<int, int> > vp;
void hsh() {
  map<int, int> mp;
  for (int(i) = 1; (i) <= (int)(n + m); (i)++) mp[B[i]];
  for (auto& p : mp) p.second = ++bcnt;
  for (int(i) = 1; (i) <= (int)(n + m); (i)++) B[i] = mp[B[i]];
}
namespace BIT {
int b[200135];
void update(int x, int v) {
  for (int i = x; i <= bcnt; i += i & -i) {
    b[i] += v;
  }
}
int query(int x) {
  int ret = 0;
  for (; x > 0; ret += b[x], x -= x & -x)
    ;
  return ret;
}
};  // namespace BIT
void cal(int l, int r) {
  if (l == r) return;
  int mid = (l + r) / 2;
  vector<pair<int, int> > lf, rt;
  for (int i = l; i <= mid; i++) {
    int id = vp[i].second;
    if (id <= n) lf.push_back({A[id], id});
  }
  for (int i = mid + 1; i <= r; i++) {
    int id = vp[i].second;
    if (id > n) rt.push_back({A[id], id});
  }
  sort(lf.begin(), lf.end());
  sort(rt.begin(), rt.end());
  int ln = lf.size(), rn = rt.size();
  int j = 0;
  for (int(i) = 0; (i) < (int)(rn); (i)++) {
    while (j < ln && lf[j].first <= rt[i].first) {
      BIT::update(B[lf[j].second], 1);
      j++;
    }
    ans[rt[i].second - n] += BIT::query(B[rt[i].second]);
  }
  for (int z = 0; z < j; z++) BIT::update(B[lf[z].second], -1);
  cal(l, mid);
  cal(mid + 1, r);
}
void fmain(int tid) {
  scanf("%d%d", &n, &m);
  for (int(i) = 1; (i) <= (int)(n); (i)++) scanf("%d", p + i);
  for (int(i) = 1; (i) <= (int)(n); (i)++) scanf("%d", s + i);
  for (int(i) = 1; (i) <= (int)(n); (i)++) scanf("%d", b + i);
  for (int(j) = 1; (j) <= (int)(m); (j)++) scanf("%d", inc + j);
  for (int(j) = 1; (j) <= (int)(m); (j)++) scanf("%d", pref + j);
  for (int(i) = 1; (i) <= (int)(n); (i)++) A[i] = b[i] + p[i];
  for (int(j) = 1; (j) <= (int)(m); (j)++) A[n + j] = pref[j] + inc[j];
  for (int(i) = 1; (i) <= (int)(n); (i)++) B[i] = p[i] - b[i];
  for (int(j) = 1; (j) <= (int)(m); (j)++) B[n + j] = inc[j] - pref[j];
  hsh();
  for (int(i) = 1; (i) <= (int)(n); (i)++) vp.push_back({-s[i], i});
  for (int(j) = 1; (j) <= (int)(m); (j)++) vp.push_back({-inc[j], n + j});
  N = n + m;
  sort(vp.begin(), vp.end());
  cal(0, N - 1);
  for (int(j) = 1; (j) <= (int)(m); (j)++) printf("%d ", ans[j]);
}
int main() {
  int t = 1;
  for (int(i) = 1; (i) <= (int)(t); (i)++) {
    fmain(i);
  }
  return 0;
}