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 Arg1>
void __f(const char* name, Arg1&& arg1) {
  cerr << name << " : " << arg1 << std::endl;
}
template <typename Arg1, typename... Args>
void __f(const char* names, Arg1&& arg1, Args&&... args) {
  const char* comma = strchr(names + 1, ',');
  cerr.write(names, comma - names) << " : " << arg1 << " | ";
  __f(comma + 1, args...);
}
template <typename T1, typename T2>
istream& operator>>(istream& in, pair<T1, T2>& a) {
  in >> a.first >> a.second;
  return in;
}
template <typename T1, typename T2>
ostream& operator<<(ostream& out, pair<T1, T2> a) {
  out << a.first << " " << a.second;
  return out;
}
template <typename T, typename T1>
T amax(T& a, T1 b) {
  if (b > a) a = b;
  return a;
}
template <typename T, typename T1>
T amin(T& a, T1 b) {
  if (b < a) a = b;
  return a;
}
const long long INF = 1e18;
const int32_t M = 1e9 + 7;
const int32_t MM = 998244353;
const long long N = 100005;
long long p[N], s[N], b[N];
long long inc[N], pref[N];
const long long maxn = 5 * 100005;
class Fenwick {
  long long bit[maxn];

 public:
  Fenwick() {
    for (long long i = 0; i < maxn; ++i) {
      bit[i] = 0;
    }
  }
  long long sum(long long x) {
    long long ret = 0;
    for (long long i = x; i >= 0; i = (i & (i + 1)) - 1) {
      ret += bit[i];
    }
    return ret;
  }
  long long sum(long long l, long long r) {
    if (l > r) return 0;
    return sum(r) - sum(l - 1);
  }
  void add(long long pos, long long val) {
    for (long long i = pos; i < maxn; i = i | (i + 1)) {
      bit[i] += val;
    }
  }
} ft1, ft2;
vector<long long> rcomp;
long long cval(long long x) {
  return lower_bound((rcomp).begin(), (rcomp).end(), x) - rcomp.begin();
}
long long tot = 0;
void add(long long id) {
  tot++;
  ft1.add(cval(b[id] + p[id]), 1);
  ft2.add(cval(b[id] - p[id]), 1);
}
void rem(long long id) {
  tot--;
  ft1.add(cval(b[id] + p[id]), -1);
  ft2.add(cval(b[id] - p[id]), -1);
}
long long ask(long long id) {
  return ft1.sum(cval(inc[id] + pref[id])) -
         ft2.sum(0, cval(pref[id] - inc[id]) - 1);
}
void solve() {
  long long n, m;
  cin >> n >> m;
  map<long long, vector<long long>> ins, del, query;
  set<long long> times;
  for (long long i = 0; i < n; ++i) {
    cin >> p[i];
    ins[p[i]].push_back(i);
    times.insert(p[i]);
  }
  for (long long i = 0; i < n; ++i) {
    cin >> s[i];
    del[s[i] + 1].push_back(i);
    times.insert(s[i] + 1);
  }
  for (long long i = 0; i < n; ++i) {
    cin >> b[i];
  }
  for (long long i = 0; i < m; ++i) {
    cin >> inc[i];
    query[inc[i]].push_back(i);
    times.insert(inc[i]);
  }
  for (long long i = 0; i < m; ++i) {
    cin >> pref[i];
  }
  for (long long i = 0; i < n; ++i) {
    rcomp.push_back(b[i] - p[i]);
    rcomp.push_back(b[i] + p[i]);
  }
  for (long long i = 0; i < m; ++i) {
    rcomp.push_back(pref[i] + inc[i]);
    rcomp.push_back(pref[i] - inc[i]);
  }
  sort((rcomp).begin(), (rcomp).end());
  rcomp.erase(unique((rcomp).begin(), (rcomp).end()), rcomp.end());
  long long ans[m];
  for (auto t : times) {
    for (auto z : del[t]) {
      rem(z);
    }
    for (auto z : ins[t]) {
      add(z);
    }
    for (auto z : query[t]) {
      ans[z] = ask(z);
    }
  }
  for (long long i = 0; i < m; ++i) {
    cout << ans[i] << " ";
  }
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long t = 1;
  while (t--) solve();
  return 0;
}