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 N = 1e5 + 10;
int n, m;
static char buf[1000000], *p1 = buf, *p2 = buf;
inline int read() {
  register int x = 0;
  register char a =
      p1 == p2 && (p2 = (p1 = buf) + fread(buf, 1, 1000000, stdin), p1 == p2)
          ? EOF
          : *p1++;
  while (a < '0' || a > '9')
    a = p1 == p2 && (p2 = (p1 = buf) + fread(buf, 1, 1000000, stdin), p1 == p2)
            ? EOF
            : *p1++;
  while (a >= '0' && a <= '9')
    x = x * 10 + (a ^ 48),
    a = p1 == p2 && (p2 = (p1 = buf) + fread(buf, 1, 1000000, stdin), p1 == p2)
            ? EOF
            : *p1++;
  return x;
}
struct tree_in_tree {
  int bit[N];
  struct t {
    int ch[2];
    int val;
  } tree[10500000];
  int root[N * 3], num;
  void opt1(int &o, int l, int r, int i, int w) {
    if (o == 0) o = ++num;
    tree[o].val += w;
    if (l == r) return;
    int mid = (l + r) >> 1;
    if (mid >= i)
      opt1(tree[o].ch[0], l, mid, i, w);
    else
      opt1(tree[o].ch[1], mid + 1, r, i, w);
  }
  void add(int pos, int y, int val) {
    if (pos == 0) return;
    for (; pos <= 3 * n + 1; pos += pos & -pos)
      opt1(root[pos], 1, 3 * n + 1, y, val);
  }
  int to2[30][30], num2;
  int opt2(int now, int l, int r, int L, int R) {
    if (R < L) return 0;
    if (l >= L && r <= R) {
      if (n == 1e5) {
      }
      int re = 0;
      for (int i = 1; i <= num2; ++i) re += tree[to2[now][i]].val;
      return re;
    }
    int mid = (l + r) >> 1;
    int ans = 0;
    if (mid >= L) {
      for (int i = 1; i <= num2; ++i) to2[now + 1][i] = tree[to2[now][i]].ch[0];
      ans += opt2(now + 1, l, mid, L, R);
    }
    if (mid < R) {
      for (int i = 1; i <= num2; ++i) to2[now + 1][i] = tree[to2[now][i]].ch[1];
      ans += opt2(now + 1, mid + 1, r, L, R);
    }
    return ans;
  }
  int que(int l, int r, int L, int R) {
    if (r < l) return 0;
    num2 = 0;
    if (r >= 0)
      for (int i = r; i; i -= i & -i) to2[0][++num2] = root[i];
    return opt2(0, 1, 3 * n + 1, L, R);
  }
} t1, t2;
struct dish {
  int p, s, b;
} d[N];
struct person {
  int ids, inc, pref;
} p[N];
int nums[N];
bool pd1(person i, person j) { return i.pref < j.pref; }
bool pd2(dish i, dish j) { return i.s < j.s; }
bool pd3(int i, int j) { return d[i].b < d[j].b; }
int val[N * 3];
int ans[N];
int main() {
  n = read();
  m = read();
  for (int i = 1; i <= n; ++i) {
    nums[i] = i;
    d[i].p = read();
  }
  for (int i = 1; i <= n; ++i) {
    d[i].s = read();
  }
  for (int i = 1; i <= n; ++i) {
    d[i].b = read();
    val[i * 3 - 2] = d[i].s;
    val[i * 3 - 1] = d[i].p + d[i].b;
    val[i * 3] = d[i].p - d[i].b;
  }
  sort(val + 1, val + 1 + 3 * n);
  for (int i = 1; i <= m; ++i) {
    p[i].ids = i;
    p[i].inc = read();
  }
  for (int i = 1; i <= m; ++i) {
    p[i].pref = read();
  }
  sort(p + 1, p + 1 + m, pd1);
  sort(d + 1, d + 1 + n, pd2);
  sort(nums + 1, nums + 1 + n, pd3);
  for (int i = 1; i <= n; ++i) {
    int xx = lower_bound(val + 1, val + 1 + 3 * n, d[i].b + d[i].p) - val;
    int yy = lower_bound(val + 1, val + 1 + 3 * n, d[i].s) - val;
    t1.add(xx, yy, 1);
  }
  int now = 1;
  for (int i = 1; i <= m; ++i) {
    while (now <= n && d[nums[now]].b < p[i].pref) {
      int xx = lower_bound(val + 1, val + 1 + 3 * n,
                           d[nums[now]].p + d[nums[now]].b) -
               val;
      int yy = lower_bound(val + 1, val + 1 + 3 * n, d[nums[now]].s) - val;
      t1.add(xx, yy, -1);
      xx = lower_bound(val + 1, val + 1 + 3 * n,
                       -d[nums[now]].b + d[nums[now]].p) -
           val;
      t2.add(xx, yy, 1);
      ++now;
    }
    int xx =
        lower_bound(val + 1, val + 1 + 3 * n, p[i].inc + p[i].pref + 1) - val;
    --xx;
    int yy = lower_bound(val + 1, val + 1 + 3 * n, p[i].inc) - val;
    ans[p[i].ids] += t1.que(1, xx, yy, 3 * n + 1);
    xx = lower_bound(val + 1, val + 1 + 3 * n, p[i].inc - p[i].pref + 1) - val;
    --xx;
    ans[p[i].ids] += t2.que(1, xx, yy, 3 * n + 1);
  }
  for (int i = 1; i <= m; ++i) printf("%d ", ans[i]);
}