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;
void dbg_out() { cerr << endl; }
template <typename Head, typename... Tail>
void dbg_out(Head H, Tail... T) {
  cerr << ' ' << H;
  dbg_out(T...);
}
pair<int, int> operator*(const pair<int, int> &p, const pair<int, int> &x) {
  pair<int, int> np = make_pair(p.first * x.first, p.second * x.second);
  return np;
}
pair<long long, long long> operator%(const pair<long long, long long> &p,
                                     const pair<long long, long long> &x) {
  pair<long long, long long> np =
      make_pair(p.first % x.first, p.second % x.second);
  return np;
}
pair<long long, long long> operator*(const pair<long long, long long> &p,
                                     const pair<int, int> &x) {
  pair<long long, long long> np =
      make_pair(p.first * x.first, p.second * x.second);
  return np;
}
pair<long long, long long> operator*(const pair<long long, long long> &p,
                                     const pair<long long, long long> &x) {
  pair<long long, long long> np =
      make_pair(p.first * x.first, p.second * x.second);
  return np;
}
pair<long long, long long> operator+(const pair<long long, long long> &p,
                                     const pair<long long, long long> &x) {
  pair<long long, long long> np =
      make_pair(p.first + x.first, p.second + x.second);
  return np;
}
pair<long long, long long> operator-(const pair<long long, long long> &p,
                                     const pair<long long, long long> &x) {
  pair<long long, long long> np =
      make_pair(p.first - x.first, p.second - x.second);
  return np;
}
pair<int, int> operator+(const pair<int, int> &p, const pair<int, int> &x) {
  pair<int, int> np = make_pair(p.first + x.first, p.second + x.second);
  return np;
}
pair<int, int> operator-(const pair<int, int> &p, const pair<int, int> &x) {
  pair<int, int> np = make_pair(p.first - x.first, p.second - x.second);
  return np;
}
vector<int> prime;
bool sortinrev(const pair<int, int> &a, const pair<int, int> &b) {
  return (a.first > b.first);
}
bool sortbysecdesc(const pair<int, int> &a, const pair<int, int> &b) {
  return a.second > b.second;
}
bool sortbysec(const pair<int, int> &a, const pair<int, int> &b) {
  return (a.second < b.second);
}
long long powerm(long long a, long long k) {
  if (!k) {
    return 1;
  }
  long long b = powerm(a, k / 2);
  b = b * b % 998244353;
  if (k % 2) {
    return a * b % 998244353;
  } else {
    return b;
  }
}
long long power(long long a, long long b) {
  if (b == 1) return a;
  if (b == 0) return 1;
  long long m1 = power(a, b / 2);
  if (b % 2) return m1 * m1 * a;
  return m1 * m1;
}
void PFactor(int x) {
  prime.clear();
  for (int i = 2; i <= x / i; i++)
    if (x % i == 0) {
      while (x % i == 0) x /= i, prime.push_back(i);
    }
  if (x > 1) prime.push_back(x);
}
bool isprime(long long a) {
  if (a <= 1) return false;
  if (a == 2 || a == 3) return true;
  if (a % 2 == 0 || a % 3 == 0) return false;
  for (long long i = 5; i * i <= a; i = i + 6) {
    if (a % i == 0 || a % (i + 2) == 0) return false;
  }
  return true;
}
long long read() {
  long long a = 0;
  char b = 1, c;
  do
    if ((c = getchar()) == 45) b = -1;
  while (c < 48 || c > 57);
  do a = (a << 3) + (a << 1) + (c & 15);
  while ((c = getchar()) > 47 && c < 58);
  return a * b;
}
void write(long long x, char c) {
  if (x < 0) putchar(45), x = -x;
  char a[20], s = 0;
  do a[++s] = x % 10 | 48;
  while (x /= 10);
  do putchar(a[s]);
  while (--s);
  putchar(c);
}
const int N = 5e6 + 20;
int n = 0, m = 0, k = 0;
string str;
struct dish {
  int l, r, x;
} d[N];
struct people {
  int w, f, tag;
} p[N];
bool cmpa(dish a, dish b) { return a.l < b.l; }
bool cmpb(dish a, dish b) { return a.r < b.r; }
bool cmp(people a, people b) { return a.w < b.w; }
void modify(int L, int R, int p, int x, int tree[]) {
  if (L == R) {
    tree[p]++;
    return;
  }
  int mid = (L + R) >> 1;
  if (x <= mid)
    modify(L, mid, p + p, x, tree);
  else
    modify(mid + 1, R, p + p + 1, x, tree);
  tree[p] = tree[p + p + 1] + tree[p + p];
}
int query(int L, int R, int p, int x, int tree[]) {
  if (x == R) return tree[p];
  int mid = (L + R) >> 1;
  if (x <= mid)
    return query(L, mid, p + p, x, tree);
  else
    return tree[p + p] + query(mid + 1, R, p + p + 1, x, tree);
}
int tree[N + 10];
int treee[N + 10];
map<int, int> g;
map<int, int> mul;
long long ans[N];
long long anss[N];
void solve() {
  sort(p + 1, p + m + 1, cmp);
  sort(d + 1, d + n + 1, cmpa);
  int pos = 1;
  for (int i = 1; i <= m; i++) {
    while (pos <= n && d[pos].l <= p[i].w) {
      modify(1, k, 1, g[d[pos].l + d[pos].x], tree);
      modify(1, k, 1, g[d[pos].l - d[pos].x], treee);
      mul[d[pos].x]++;
      pos++;
    }
    ans[i] += query(1, k, 1, g[p[i].w + p[i].f], tree);
    ans[i] += query(1, k, 1, g[p[i].w - p[i].f], treee);
    ans[i] -= (pos - 1);
  }
  memset(tree, 0, sizeof(tree));
  memset(treee, 0, sizeof(treee));
  mul.clear();
  sort(d + 1, d + n + 1, cmpb);
  pos = 1;
  for (int i = 1; i <= m; i++) {
    while (pos <= n && d[pos].r < p[i].w) {
      modify(1, k, 1, g[d[pos].l + d[pos].x], tree);
      modify(1, k, 1, g[d[pos].l - d[pos].x], treee);
      mul[d[pos].x]++;
      pos++;
    }
    ans[i] -= query(1, k, 1, g[p[i].w + p[i].f], tree);
    ans[i] -= query(1, k, 1, g[p[i].w - p[i].f], treee);
    ans[i] += (pos - 1);
  }
}
void init() {
  cin >> n >> m;
  for (int i = 1; i <= n; i++) d[i].l = read();
  for (int i = 1; i <= n; i++) d[i].r = read();
  for (int i = 1; i <= n; i++) d[i].x = read();
  for (int i = 1; i <= m; i++) p[i].w = read();
  for (int i = 1; i <= m; i++) p[i].f = read(), p[i].tag = i;
  for (int i = 1; i <= n; i++) g[d[i].l + d[i].x]++, g[d[i].l - d[i].x]++;
  for (int i = 1; i <= m; i++) g[p[i].w + p[i].f]++, g[p[i].w - p[i].f]++;
  for (auto x : g) g[x.first] = ++k;
}
int main() {
  init();
  solve();
  for (int i = 1; i <= m; i++) anss[p[i].tag] = ans[i];
  for (int i = 1; i <= m; i++) write(anss[i], ' ');
}