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>
const long long inf = 4e9;
inline int read() {
  char c = getchar();
  int x = 0, ft = 1;
  for (; c < '0' || c > '9'; c = getchar())
    if (c == '-') ft = -1;
  for (; c >= '0' && c <= '9'; c = getchar()) x = x * 10 + c - '0';
  return x * ft;
}
const int N = 3e5 + 5;
int n, m, lim, p[N], s[N], b[N], x[N], y[N], ec, ans[N];
struct Evt {
  int p, x, y, id;
  inline bool operator<(const Evt& r) const {
    return p == r.p ? id < r.id : p < r.p;
  }
} evt[N << 1];
const int T = 1e7 + 5;
struct Segment_Tree {
  int rt, node_cnt, lc[T], rc[T], sum[T];
  void modify(int g, int c, int l, int r, int& u) {
    if (!u) u = ++node_cnt;
    if (l == r)
      sum[u] += c;
    else {
      int mid = (inf + l + inf + r) / 2 - inf;
      if (g <= mid)
        modify(g, c, l, mid, lc[u]);
      else
        modify(g, c, mid + 1, r, rc[u]);
      sum[u] = sum[lc[u]] + sum[rc[u]];
    }
  }
  int query(int ql, int qr, int l, int r, int u) {
    if (!u) return 0;
    if (ql <= l && r <= qr)
      return sum[u];
    else {
      int mid = (inf + l + inf + r) / 2 - inf;
      if (qr <= mid) return query(ql, qr, l, mid, lc[u]);
      if (ql > mid) return query(ql, qr, mid + 1, r, rc[u]);
      return query(ql, qr, l, mid, lc[u]) + query(ql, qr, mid + 1, r, rc[u]);
    }
  }
} seg[2];
int main() {
  n = read();
  m = read();
  lim = 2e9;
  for (int i = 1; i <= n; ++i) p[i] = read();
  for (int i = 1; i <= n; ++i) s[i] = read();
  for (int i = 1; i <= n; ++i) b[i] = read();
  for (int i = 1; i <= m; ++i) x[i] = read();
  for (int i = 1; i <= m; ++i) y[i] = read();
  for (int i = 1; i <= n; ++i) {
    evt[++ec] = (Evt){p[i], b[i] + p[i], b[i] - p[i], 0};
    evt[++ec] = (Evt){s[i] + 1, b[i] + p[i], b[i] - p[i], -1};
  }
  for (int i = 1; i <= m; ++i) {
    evt[++ec] = (Evt){x[i], y[i] + x[i], y[i] - x[i], i};
  }
  std::sort(evt + 1, evt + 1 + ec);
  for (int i = 1, cnt = 0; i <= ec; ++i) {
    if (evt[i].id == 0) {
      ++cnt;
      seg[0].modify(evt[i].x, 1, -lim, lim, seg[0].rt);
      seg[1].modify(evt[i].y, 1, -lim, lim, seg[1].rt);
    } else if (evt[i].id == -1) {
      --cnt;
      seg[0].modify(evt[i].x, -1, -lim, lim, seg[0].rt);
      seg[1].modify(evt[i].y, -1, -lim, lim, seg[1].rt);
    } else {
      int res = 0;
      res += seg[0].query(-lim, evt[i].x, -lim, lim, seg[0].rt);
      res += seg[1].query(evt[i].y, lim, -lim, lim, seg[1].rt);
      ans[evt[i].id] = res - cnt;
    }
  }
  for (int i = 1; i <= m; ++i) printf("%d ", ans[i]);
  return 0;
}