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;
const int INF = 0x3f3f3f3f;
const long long inf = 0x3f3f3f3f3f3f3f3f;
const long long mod = 1e9 + 7;
const int N = 4e5 + 10;
int n, m;
vector<int> vc;
int p[N], s[N], b[N], inc[N], pref[N], ans[N];
struct BIT {
  int sum[N], n;
  int lowbit(int x) { return x & -x; }
  void add(int p, int x) {
    for (int i = p; i <= n; i += lowbit(i)) sum[i] += x;
  }
  int qry(int r) {
    int res = 0;
    for (int i = r; i > 0; i -= lowbit(i)) res += sum[i];
    return res;
  }
} b1, b2;
struct X {
  int p, x, y, op, id;
  bool operator<(const X& b) const { return p == b.p ? id < b.id : p < b.p; }
};
vector<X> vv;
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= n; i++) scanf("%d", &p[i]);
  for (int i = 1; i <= n; i++) scanf("%d", &s[i]);
  for (int i = 1; i <= n; i++) scanf("%d", &b[i]);
  for (int i = 1; i <= m; i++) scanf("%d", &inc[i]);
  for (int i = 1; i <= m; i++) scanf("%d", &pref[i]);
  for (int i = 1; i <= n; i++) {
    vc.push_back(b[i] - p[i] + 1);
    vc.push_back(b[i] + p[i]);
  }
  for (int i = 1; i <= m; i++) {
    vc.push_back(inc[i] + pref[i]);
    vc.push_back(pref[i] - inc[i]);
  }
  sort(vc.begin(), vc.end());
  vc.erase(unique(vc.begin(), vc.end()), vc.end());
  b1.n = b2.n = (int)vc.size();
  for (int i = 1; i <= n; i++) {
    vv.push_back(X{p[i], b[i], p[i], 1, 0});
    vv.push_back(X{s[i] + 1, b[i], p[i], -1, 0});
  }
  for (int i = 1; i <= m; i++) {
    vv.push_back(X{inc[i], inc[i], pref[i], 0, i});
  }
  sort(vv.begin(), vv.end());
  for (auto t : vv) {
    if (t.id) {
      int x = lower_bound(vc.begin(), vc.end(), t.x + t.y) - vc.begin() + 1;
      int y = lower_bound(vc.begin(), vc.end(), t.y - t.x) - vc.begin() + 1;
      ans[t.id] = b1.qry(x) + b2.qry(y);
    } else {
      int x = lower_bound(vc.begin(), vc.end(), t.x + t.y) - vc.begin() + 1;
      int y = lower_bound(vc.begin(), vc.end(), t.x - t.y + 1) - vc.begin() + 1;
      b1.add(x, t.op);
      b2.add(y, -t.op);
    }
  }
  for (int i = 1; i <= m; i++) printf("%d%s", ans[i], i == m ? "\n" : " ");
  return 0;
}