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;
template <class T>
bool ckmin(T& a, const T& b) {
  return b < a ? a = b, 1 : 0;
}
template <class T>
bool ckmax(T& a, const T& b) {
  return a < b ? a = b, 1 : 0;
}
template <class T>
struct node {
  T val;
  long long l, r;
  node* left;
  node* right;
  node(long long l, long long r) {
    this->l = l;
    this->r = r;
    this->left = nullptr;
    this->right = nullptr;
  }
};
template <class T, long long SZ>
struct segtree {
  T identity = 0;
  long long shift;
  T comb(T l, T r) { return l + r; }
  void updLeaf(T& l, T val) { l += val; }
  node<T>* root;
  segtree(int sh) {
    this->shift = sh;
    long long ub = 1;
    while (ub < SZ) ub *= 2LL;
    root = new node<T>(0, ub - 1);
    root->val = identity;
  }
  void updN(node<T>* n, int pos, T val) {
    if (pos < n->l || pos > n->r) return;
    if (n->l == n->r) {
      updLeaf(n->val, val);
      return;
    }
    long long mid = (n->l + n->r) / 2;
    if (pos > mid) {
      if (n->right == nullptr) {
        n->right = new node<T>(mid + 1, n->r);
        n->right->val = identity;
      }
      updN(n->right, pos, val);
    } else {
      if (n->left == nullptr) {
        n->left = new node<T>(n->l, mid);
        n->left->val = identity;
      }
      updN(n->left, pos, val);
    }
    T lv = (n->left == nullptr) ? identity : n->left->val;
    T rv = (n->right == nullptr) ? identity : n->right->val;
    n->val = comb(lv, rv);
  }
  void upd(long long pos, T val) {
    pos += shift;
    updN(root, pos, val);
  }
  T queryN(node<T>* n, long long i1, long long i2) {
    if (i2 < n->l || i1 > n->r) return identity;
    if (n->l == n->r) return n->val;
    if (n->l >= i1 && n->r <= i2) return n->val;
    T a = identity;
    if (n->left != nullptr) a = comb(a, queryN(n->left, i1, i2));
    if (n->right != nullptr) a = comb(a, queryN(n->right, i1, i2));
    return a;
  }
  T query(long long i1, long long i2) {
    i1 += shift;
    i2 += shift;
    return queryN(root, i1, i2);
  }
};
struct event {
  bool isInterval;
  bool isStart;
  pair<pair<int, int>, int> val;
  event(bool a, bool b, pair<pair<int, int>, int> c) {
    this->isInterval = a;
    this->isStart = b;
    this->val = c;
  }
};
int getIdx(event e) {
  if (e.isInterval) {
    if (e.isStart) return e.val.first.first;
    return e.val.first.second;
  }
  return e.val.first.first;
}
bool operator<(const event& l, const event& r) {
  if (getIdx(l) != getIdx(r)) return getIdx(l) < getIdx(r);
  if (l.isStart != r.isStart) return l.isStart > r.isStart;
  return l.isInterval < r.isInterval;
}
const int MAX_N = 100010;
const long long MX = 1000000005;
int n, m;
pair<pair<int, int>, int> intervals[MAX_N];
pair<int, int> queries[MAX_N];
segtree<int, 3LL * MX> stL(MX);
segtree<int, 3LL * MX> stR(0);
int ans[MAX_N];
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cin >> n >> m;
  for (int i = 0; i < n; i++) cin >> intervals[i].first.first;
  for (int i = 0; i < n; i++) cin >> intervals[i].first.second;
  for (int i = 0; i < n; i++) cin >> intervals[i].second;
  for (int i = 0; i < m; i++) cin >> queries[i].first;
  for (int i = 0; i < m; i++) cin >> queries[i].second;
  vector<event> events;
  for (int i = 0; i < n; i++) {
    events.push_back(event(1, 1, intervals[i]));
    events.push_back(event(1, 0, intervals[i]));
  }
  for (int i = 0; i < m; i++) {
    events.push_back(event(0, 0, {queries[i], i}));
  }
  sort(events.begin(), events.end());
  int curIdx = 0;
  for (int i = 0; i < (int)events.size(); i++) {
    event ev = events[i];
    int idx = getIdx(ev);
    int dis = idx - curIdx;
    curIdx = idx;
    stL.shift -= dis;
    stR.shift += dis;
    if (ev.isInterval) {
      if (ev.isStart) {
        stL.upd(ev.val.second, 1);
        stR.upd(ev.val.second, 1);
      } else {
        stL.upd(ev.val.second + ev.val.first.second - ev.val.first.first, -1);
        stR.upd(ev.val.second - ev.val.first.second + ev.val.first.first, -1);
      }
    } else {
      int thing = stL.query(ev.val.first.second, 2LL * MX - 1);
      if (ev.val.first.second != 0)
        thing -= stR.query(ev.val.first.second + 1, 2LL * MX - 1);
      ans[ev.val.second] = thing;
    }
  }
  for (int i = 0; i < m; i++) {
    if (i != 0) cout << " ";
    cout << ans[i];
  }
  cout << "\n";
}