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;
inline void setmin(int &x, int y) {
  if (y < x) x = y;
}
inline void setmax(int &x, int y) {
  if (y > x) x = y;
}
inline void setmin(long long &x, long long y) {
  if (y < x) x = y;
}
inline void setmax(long long &x, long long y) {
  if (y > x) x = y;
}
const int N = 100000;
const int inf = (int)1e9 + 1;
const long long big = (long long)1e18 + 1;
const int P1 = 31;
const int P2 = 57;
const int MOD = (int)1e9 + 7;
const int MOD1 = (int)1e9 + 9;
const int MOD2 = 998244353;
const double eps = 1e-9;
const double pi = atan2(0, -1);
const int ABC = 26;
namespace Treap {
mt19937 gen(239);
struct node {
  int x;
  long long sum;
  int pr;
  node *L, *R;
  int sz;
  node() {}
  node(int x) {
    this->x = x;
    this->sum = x;
    this->pr = gen();
    this->L = NULL;
    this->R = NULL;
    this->sz = 1;
  }
  void print() { cout << x << " "; }
};
int get_sz(node *t) {
  if (t == NULL) {
    return 0;
  } else {
    return t->sz;
  }
}
long long get_sum(node *t) {
  if (t == NULL) {
    return 0;
  } else {
    return t->sum;
  }
}
void push(node *t) {}
void upd(node *t) {
  if (t == NULL) {
    return;
  }
  push(t);
  t->sz = get_sz(t->L) + 1 + get_sz(t->R);
  t->sum = get_sum(t->L) + t->x + get_sum(t->R);
}
node *exist(node *t, int x) {
  if (t == NULL) {
    return NULL;
  }
  push(t);
  if (t->x == x) {
    return t;
  } else if (x < t->x) {
    return exist(t->L, x);
  } else {
    return exist(t->R, x);
  }
}
pair<node *, node *> split(node *t, int x) {
  if (t == NULL) {
    return {NULL, NULL};
  }
  push(t);
  if (x <= t->x) {
    auto p = split(t->L, x);
    t->L = p.second;
    upd(t);
    p.second = t;
    return p;
  } else {
    auto p = split(t->R, x);
    t->R = p.first;
    upd(t);
    p.first = t;
    return p;
  }
}
pair<node *, node *> splitCnt(node *t, int cnt) {
  if (t == NULL) {
    return {NULL, NULL};
  }
  push(t);
  if (get_sz(t->L) >= cnt) {
    auto p = splitCnt(t->L, cnt);
    t->L = p.second;
    upd(t);
    p.second = t;
    return p;
  } else {
    auto p = splitCnt(t->R, cnt - get_sz(t->L) - 1);
    t->R = p.first;
    upd(t);
    p.first = t;
    return p;
  }
}
node *merge(node *l, node *r) {
  if (l == NULL) return r;
  if (r == NULL) return l;
  push(l);
  push(r);
  if (l->pr <= r->pr) {
    l->R = merge(l->R, r);
    upd(l);
    return l;
  } else {
    r->L = merge(l, r->L);
    upd(r);
    return r;
  }
}
node *mergeAny(node *l, node *r) {
  if (l == NULL) return r;
  if (r == NULL) return l;
  push(l);
  push(r);
  if (l->pr > r->pr) {
    swap(l, r);
  }
  auto t = split(r, l->x);
  auto t2 = split(t.second, l->x + 1);
  l->L = mergeAny(l->L, t.first);
  l->R = mergeAny(l->R, t2.second);
  upd(l);
  return l;
}
int next(node *t, int x) {
  if (t->x <= x && t->R == NULL)
    return inf;
  else if (t->x <= x)
    return next(t->R, x);
  else if (t->L != NULL)
    return min(next(t->L, x), t->x);
  else
    return t->x;
}
int prev(node *t, int x) {
  if (t->x >= x && t->L == NULL)
    return -inf;
  else if (t->x >= x)
    return prev(t->L, x);
  else if (t->R != NULL)
    return max(prev(t->R, x), t->x);
  else
    return t->x;
}
int kth(node *t, int k) {
  if (get_sz(t->L) == k)
    return t->x;
  else if (get_sz(t->L) > k)
    return kth(t->L, k);
  else
    return kth(t->R, k - get_sz(t->L) - 1);
}
node *add(node *t, int x) {
  auto p = split(t, x);
  return merge(merge(p.first, new node(x)), p.second);
}
node *del(node *t, int x) {
  auto p = split(t, x);
  auto p1 = splitCnt(p.second, 1);
  return merge(p.first, p1.second);
}
void get_elem(node *t, vector<node *> &res) {
  if (t == NULL) {
    return;
  }
  push(t);
  get_elem(t->L, res);
  res.push_back(t);
  get_elem(t->R, res);
}
void print(node *t, int is_last = true) {
  if (t == NULL) {
    if (is_last) {
      cout << "\n";
    }
    return;
  }
  push(t);
  print(t->L, false);
  t->print();
  print(t->R, is_last);
}
}  // namespace Treap
using namespace Treap;
int p[N], s[N], b[N], inc[N], pref[N];
struct Query {
  int t, type, x, y;
  Query() {}
  Query(int t, int type, int x, int y) : t(t), type(type), x(x), y(y) {}
};
bool operator<(Query q1, Query q2) {
  return (q1.t != q2.t ? q1.t < q2.t : q1.type < q2.type);
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.precision(100);
  cout << fixed;
  int n, m;
  cin >> n >> m;
  for (int i = 0; i < n; i++) {
    cin >> p[i];
  }
  for (int i = 0; i < n; i++) {
    cin >> s[i];
  }
  for (int i = 0; i < n; i++) {
    cin >> b[i];
  }
  for (int i = 0; i < m; i++) {
    cin >> inc[i];
  }
  for (int i = 0; i < m; i++) {
    cin >> pref[i];
  }
  vector<Query> q;
  for (int i = 0; i < n; i++) {
    q.push_back(Query(p[i], -1, p[i], b[i]));
    q.push_back(Query(s[i], 1, p[i], b[i]));
  }
  for (int i = 0; i < m; i++) {
    q.push_back(Query(inc[i], 0, i, pref[i]));
  }
  sort(q.begin(), q.end());
  int ans[m];
  node *D1 = NULL, *D2 = NULL;
  for (auto it : q) {
    if (it.type == -1) {
      int x = it.x, y = it.y;
      D1 = add(D1, y - x);
      D2 = add(D2, y + x);
    } else if (it.type == 1) {
      int x = it.x, y = it.y;
      D1 = del(D1, y - x);
      D2 = del(D2, y + x);
    } else {
      int x = it.t, y = it.y;
      int tot = get_sz(D1);
      auto P = split(D1, y - x);
      tot -= get_sz(P.first);
      D1 = merge(P.first, P.second);
      P = split(D2, y + x + 1);
      tot -= get_sz(P.second);
      D2 = merge(P.first, P.second);
      ans[it.x] = tot;
    }
  }
  for (int i = 0; i < m; i++) {
    cout << ans[i] << " ";
  }
  cout << "\n";
  return 0;
}