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;
clock_t __stt;
inline void TStart() { __stt = clock(); }
inline void TReport() {
  cerr << fixed << setprecision(3) << "\nCurrent Case Taken Time : "
       << (double)(clock() - __stt) / CLOCKS_PER_SEC << "sec\n";
}
template <typename T>
T MIN(T a, T b) {
  return a < b ? a : b;
}
template <typename T>
T MAX(T a, T b) {
  return a > b ? a : b;
}
template <typename T>
T ABS(T a) {
  return a > 0 ? a : (-a);
}
template <typename T>
void UMIN(T &a, T b) {
  if (b < a) a = b;
}
template <typename T>
void UMAX(T &a, T b) {
  if (b > a) a = b;
}
int n, m, p[100005], s[100005], b[100005], inc[100005], pref[100005];
struct ele {
  int A, B, C, id;
  void set(int _A, int _B, int _C, int _id) {
    A = _A;
    B = _B;
    C = _C;
    id = _id;
  }
} es[100005], et[100005];
struct qry {
  int Al, Ar, B, C;
  void set(int _Al, int _Ar, int _B, int _C) {
    Al = _Al;
    Ar = _Ar;
    B = _B;
    C = _C;
  }
} qs[100005], qt[100005];
namespace BIT {
int arr[300005];
void add(int p, int v = 1) {
  ++p;
  while (p <= 300002) {
    arr[p] += v;
    p += (p & (-p));
  }
}
void clr(int p) {
  ++p;
  while (p <= 300002) {
    arr[p] = 0;
    p += (p & (-p));
  }
}
int sum(int p) {
  int r = 0;
  ++p;
  while (p) {
    r += arr[p];
    p -= (p & (-p));
  }
  return r;
}
}  // namespace BIT
bool cmpB(ele a, ele b) { return a.B < b.B; }
bool cmpC(ele a, ele b) { return a.C < b.C; }
bool cmpBq(qry a, qry b) { return a.B < b.B; }
bool cmpCq(qry a, qry b) { return a.C < b.C; }
vector<int> vs;
int id(int v) { return lower_bound(vs.begin(), vs.end(), v) - vs.begin(); }
int res[100005];
void solve2d(ele *E, int ec, qry *Q, int qc) {
  int i, j, k;
  sort(E, E + ec, cmpB);
  sort(Q, Q + qc, cmpBq);
  reverse(Q, Q + qc);
  reverse(E, E + ec);
  j = 0;
  for (i = 0; i < ec; ++i) {
    int cB = E[i].B;
    while (j < qc && Q[j].B >= cB) {
      BIT::add(Q[j].Al, 1);
      BIT::add(Q[j].Ar + 1, -1);
      ++j;
    }
    res[E[i].id] += BIT::sum(E[i].A);
  }
  for (i = 0; i < qc; ++i) {
    BIT::clr(Q[i].Al);
    BIT::clr(Q[i].Ar + 1);
  }
}
void solve(int cl, int cr, int ql, int qr, int el, int er) {
  if (ql > qr || el > er) return;
  int i, j, k;
  if (cl == cr) {
    solve2d(es + el, er - el + 1, qs + ql, qr - ql + 1);
    return;
  }
  memcpy(et + el, es + el, sizeof(ele) * (er - el + 1));
  memcpy(qt + ql, qs + ql, sizeof(qry) * (qr - ql + 1));
  int cM = ((long long)cl + (long long)cr) / 2ll, qM, eM;
  for (qM = ql; qM <= qr; ++qM) {
    if (qt[qM].C <= cM && (qM == qr || qt[qM + 1].C > cM)) break;
  }
  if (qt[ql].C > cM) qM = ql - 1;
  for (eM = el; eM <= er; ++eM) {
    if (et[eM].C <= cM && (eM == er || et[eM + 1].C > cM)) break;
  }
  if (et[el].C > cM) eM = el - 1;
  if (er > eM && qM >= ql) solve2d(et + eM + 1, er - eM, qt + ql, qM - ql + 1);
  solve(cl, cM, ql, qM, el, eM);
  solve(cM + 1, cr, qM + 1, qr, eM + 1, er);
}
int main() {
  int i, j, k;
  scanf("%d%d", &n, &m);
  for (i = 0; i < n; ++i) scanf("%d", p + i);
  for (i = 0; i < n; ++i) scanf("%d", s + i);
  for (i = 0; i < n; ++i) scanf("%d", b + i);
  for (i = 0; i < m; ++i) scanf("%d", inc + i);
  for (i = 0; i < m; ++i) scanf("%d", pref + i);
  for (i = 0; i < n; ++i) {
    qs[i].Al = p[i];
    qs[i].Ar = s[i];
    vs.push_back(p[i]);
    vs.push_back(s[i]);
    qs[i].B = b[i] - p[i];
    qs[i].C = b[i] + p[i];
  }
  for (j = 0; j < m; ++j) {
    es[j].A = inc[j];
    vs.push_back(inc[j]);
    es[j].B = pref[j] - inc[j];
    es[j].C = pref[j] + inc[j];
    es[j].id = j;
  }
  sort(vs.begin(), vs.end());
  vs.erase(unique(vs.begin(), vs.end()), vs.end());
  for (i = 0; i < n; ++i) {
    qs[i].Al = id(qs[i].Al);
    qs[i].Ar = id(qs[i].Ar);
  }
  for (j = 0; j < m; ++j) {
    es[j].A = id(es[j].A);
  }
  sort(es, es + m, cmpC);
  sort(qs, qs + n, cmpCq);
  solve(0, (int)2e9 + 5, 0, n - 1, 0, m - 1);
  for (i = 0; i < m; ++i) {
    printf("%d ", res[i]);
  }
  return 0;
}