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;
using ld = long double;
using ll = long long;
using vi = vector<int>;
using pii = pair<int, int>;
const int MX = 1e5;
const ll ST_MIN = -(1e9);
const ll ST_MAX = 2 * 1e9;
const ll ST_INC = 1e9;
const int ABRE = 0;
const int QUERY = 1;
const int CIERRA = 2;
struct Seg {
  ll desde, hasta;
  Seg *izq, *der;
  int sum;
  Seg(ll i, ll d, bool externo = true) {
    desde = i;
    hasta = d;
    izq = NULL;
    der = NULL;
    sum = 0;
    if (externo) {
      desde += ST_INC;
      hasta += ST_INC;
    }
  }
  void seg_update(ll idx, int v) {
    if (desde > idx || hasta < idx) return;
    if (desde >= hasta) {
      sum += v;
      return;
    }
    ll mitad = (desde + hasta) / 2LL;
    if (idx <= mitad) {
      if (izq == NULL) izq = new Seg(desde, mitad, false);
      izq->seg_update(idx, v);
    } else {
      if (der == NULL) der = new Seg(mitad + 1, hasta, false);
      der->seg_update(idx, v);
    }
    sum = 0;
    if (izq != NULL) sum += izq->sum;
    if (der != NULL) sum += der->sum;
  }
  int seg_query(ll ri, ll rf) {
    if (desde > rf || hasta < ri) return 0;
    if (desde >= ri && hasta <= rf) return sum;
    int res = 0;
    if (izq != NULL) res += izq->seg_query(ri, rf);
    if (der != NULL) res += der->seg_query(ri, rf);
    return res;
  }
  void update(ll idx, int v) { seg_update(idx + ST_INC, v); }
  int query(ll ri, ll rf) { return seg_query(ri + ST_INC, rf + ST_INC); }
};
struct EVENTO {
  int prio;
  int idx;
  int b, l, x;
  const bool operator<(const EVENTO &otro) const {
    if (x == otro.x) {
      return prio < otro.prio;
    }
    return x < otro.x;
  }
};
vector<EVENTO> eventos;
int res_q[MX + 2];
int o_l[MX + 2];
int o_r[MX + 2];
int o_b[MX + 2];
int q_x[MX + 2];
int q_B[MX + 2];
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n, m;
  cin >> n >> m;
  for (int i = 0; i < n; ++i) cin >> o_l[i];
  for (int i = 0; i < n; ++i) cin >> o_r[i];
  for (int i = 0; i < n; ++i) cin >> o_b[i];
  for (int i = 0; i < n; ++i) {
    EVENTO e;
    e.b = o_b[i];
    e.l = o_l[i];
    e.prio = ABRE;
    e.x = o_l[i];
    eventos.push_back(e);
    e.prio = CIERRA;
    e.x = o_r[i];
    eventos.push_back(e);
  }
  for (int i = 0; i < m; ++i) cin >> q_x[i];
  for (int i = 0; i < m; ++i) cin >> q_B[i];
  for (int i = 0; i < m; ++i) {
    EVENTO e;
    e.prio = QUERY;
    e.idx = i;
    e.b = q_B[i];
    e.x = q_x[i];
    eventos.push_back(e);
  }
  Seg *tree_bajo = new Seg(ST_MIN, ST_MAX);
  Seg *tree_alto = new Seg(ST_MIN, ST_MAX);
  sort(eventos.begin(), eventos.end());
  int cnt_abiertos = 0;
  for (EVENTO e : eventos) {
    if (e.prio == ABRE) {
      tree_bajo->update(e.b - e.l, 1);
      tree_alto->update(e.b + e.l, 1);
      cnt_abiertos++;
    } else if (e.prio == CIERRA) {
      tree_bajo->update(e.b - e.l, -1);
      tree_alto->update(e.b + e.l, -1);
      cnt_abiertos--;
    } else {
      int fuera = 0;
      fuera += tree_bajo->query(ST_MIN, e.b - e.x - 1);
      fuera += tree_alto->query(e.b + e.x + 1, ST_MAX);
      res_q[e.idx] = cnt_abiertos - fuera;
    }
  }
  for (int i = 0; i < m; ++i) cout << res_q[i] << " \n"[i == m - 1];
  return 0;
}