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 ll = long long;
const int N = 300005;
struct BIT2 {
  struct BIT {
    vector<int> v, d;
    int s;
    void b(int y) { v.push_back(y); }
    void a() {
      sort(v.begin(), v.end());
      s = v.size();
      d = vector<int>(s + 1, 0);
    }
    int i(int y) { return int(upper_bound(v.begin(), v.end(), y) - v.begin()); }
    void u(int y, int v) {
      for (y = i(y); y <= s; y += y & -y) d[y] += v;
    }
    int g(int y) {
      int r = 0;
      for (y = i(y); y; y -= y & -y) r += d[y];
      return r;
    }
  } d[N];
  void b(int x, int y) {
    for (; x < N; x += x & -x) d[x].b(y);
  }
  void a() {
    for (int i = 1; i < N; i++) d[i].a();
  }
  void u(int x, int y, int v) {
    for (; x < N; x += x & -x) d[x].u(y, v);
  }
  int g(int x, int y) {
    int r = 0;
    for (; x; x -= x & -x) r += d[x].g(y);
    return r;
  }
} A, B;
int n, m;
ll b[N], p[N], s[N], x[N], y[N], z[N], inc[N], pre[N];
ll qx[N], qy[N], qz[N], qw[N];
ll wx[N], wy[N], wz[N];
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= n; i++) scanf("%lld", p + i);
  for (int i = 1; i <= n; i++) scanf("%lld", s + i);
  for (int i = 1; i <= n; i++) scanf("%lld", b + i);
  for (int i = 1; i <= m; i++) scanf("%lld", inc + i);
  for (int i = 1; i <= m; i++) scanf("%lld", pre + i);
  int c = 0, d = 0;
  for (int i = 1; i <= n; i++, c++, d += 2) {
    x[c] = qx[i] = p[i] + b[i];
    y[c] = qy[i] = s[i] + 1;
    z[d] = qz[i] = p[i] - b[i];
    z[d + 1] = qw[i] = 2 * s[i] - b[i] - p[i];
  }
  for (int i = 1; i <= m; i++, c++, d++) {
    x[c] = wx[i] = pre[i] + inc[i];
    y[c] = wy[i] = inc[i];
    z[d] = wz[i] = inc[i] - pre[i];
  }
  sort(x, x + c);
  sort(y, y + c);
  sort(z, z + d);
  auto cpr = [](ll &x, ll a[], int c) {
    x = int(lower_bound(a, a + c, x) - a + 1);
  };
  for (int i = 1; i <= n; i++) {
    cpr(qx[i], x, c);
    cpr(qy[i], y, c);
    cpr(qz[i], z, d);
    cpr(qw[i], z, d);
    A.b(qx[i], qz[i]);
    A.b(qx[i], qw[i] + 1);
    B.b(qy[i], qz[i]);
    B.b(qy[i], qw[i] + 1);
  }
  A.a();
  B.a();
  for (int i = 1; i <= n; i++) {
    A.u(qx[i], qz[i], 1);
    A.u(qx[i], qw[i] + 1, -1);
    B.u(qy[i], qz[i], 1);
    B.u(qy[i], qw[i] + 1, -1);
  }
  for (int i = 1; i <= m; i++) {
    cpr(wx[i], x, c);
    cpr(wy[i], y, c);
    cpr(wz[i], z, d);
    printf("%d ", A.g(wx[i], wz[i]) - B.g(wy[i], wz[i]));
  }
  puts("");
  return 0;
}