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 double eps = 1e-8;
const double pi = acos(-1.0);
template <class T>
bool chkmin(T &a, T b) {
  return a > b ? a = b, 1 : 0;
}
template <class T>
bool chkmax(T &a, T b) {
  return a < b ? a = b, 1 : 0;
}
template <class T>
T sqr(T a) {
  return a * a;
}
template <class T>
T mmin(T a, T b) {
  return a < b ? a : b;
}
template <class T>
T mmax(T a, T b) {
  return a > b ? a : b;
}
template <class T>
T aabs(T a) {
  return a < 0 ? -a : a;
}
template <class T>
bool dcmp(T a, T b) {
  return a > b;
}
template <int *a>
bool cmp_a(bool first, bool second) {
  return a[first] < a[second];
}
namespace io {
const int SIZE = (1 << 21) + 1;
char ibuf[SIZE], *iS, *iT, obuf[SIZE], *oS = obuf, *oT = oS + SIZE - 1, c,
                                       qu[55];
int f, qr;
inline void flush() {
  fwrite(obuf, 1, oS - obuf, stdout);
  oS = obuf;
}
inline void putc(char first) {
  *oS++ = first;
  if (oS == oT) flush();
}
inline bool read(signed &first) {
  for (f = 1, c = (iS == iT ? (iT = (iS = ibuf) + fread(ibuf, 1, SIZE, stdin),
                              (iS == iT ? EOF : *iS++))
                            : *iS++);
       c < '0' || c > '9';
       c = (iS == iT ? (iT = (iS = ibuf) + fread(ibuf, 1, SIZE, stdin),
                       (iS == iT ? EOF : *iS++))
                     : *iS++))
    if (c == '-')
      f = -1;
    else if (c == EOF)
      return 0;
  for (first = 0; c <= '9' && c >= '0';
       c = (iS == iT ? (iT = (iS = ibuf) + fread(ibuf, 1, SIZE, stdin),
                       (iS == iT ? EOF : *iS++))
                     : *iS++))
    first = first * 10 + (c & 15);
  first *= f;
  return 1;
}
inline bool read(long long &first) {
  for (f = 1, c = (iS == iT ? (iT = (iS = ibuf) + fread(ibuf, 1, SIZE, stdin),
                              (iS == iT ? EOF : *iS++))
                            : *iS++);
       c < '0' || c > '9';
       c = (iS == iT ? (iT = (iS = ibuf) + fread(ibuf, 1, SIZE, stdin),
                       (iS == iT ? EOF : *iS++))
                     : *iS++))
    if (c == '-')
      f = -1;
    else if (c == EOF)
      return 0;
  for (first = 0; c <= '9' && c >= '0';
       c = (iS == iT ? (iT = (iS = ibuf) + fread(ibuf, 1, SIZE, stdin),
                       (iS == iT ? EOF : *iS++))
                     : *iS++))
    first = first * 10 + (c & 15);
  first *= f;
  return 1;
}
inline bool read(char &first) {
  first = (iS == iT ? (iT = (iS = ibuf) + fread(ibuf, 1, SIZE, stdin),
                       (iS == iT ? EOF : *iS++))
                    : *iS++);
  return first != EOF;
}
inline bool read(char *first) {
  while ((*first = (iS == iT ? (iT = (iS = ibuf) + fread(ibuf, 1, SIZE, stdin),
                                (iS == iT ? EOF : *iS++))
                             : *iS++)) == '\n' ||
         *first == ' ' || *first == '\r')
    if (*first == EOF) return 0;
  while (!(*first == '\n' || *first == ' ' || *first == '\r'))
    *(++first) = (iS == iT ? (iT = (iS = ibuf) + fread(ibuf, 1, SIZE, stdin),
                              (iS == iT ? EOF : *iS++))
                           : *iS++);
  *first = 0;
  return 1;
}
template <typename A, typename... B>
inline bool read(A &first, B &...second) {
  return read(first) && read(second...);
}
inline bool write(signed first) {
  if (!first) putc('0');
  if (first < 0) putc('-'), first = -first;
  while (first) qu[++qr] = first % 10 + '0', first /= 10;
  while (qr) putc(qu[qr--]);
  return 0;
}
inline bool write(long long first) {
  if (!first) putc('0');
  if (first < 0) putc('-'), first = -first;
  while (first) qu[++qr] = first % 10 + '0', first /= 10;
  while (qr) putc(qu[qr--]);
  return 0;
}
inline bool write(char first) {
  putc(first);
  return 0;
}
inline bool write(const char *first) {
  while (*first) {
    putc(*first);
    ++first;
  }
  return 0;
}
inline bool write(char *first) {
  while (*first) {
    putc(*first);
    ++first;
  }
  return 0;
}
template <typename A, typename... B>
inline bool write(A first, B... second) {
  return write(first) || write(second...);
}
struct Flusher_ {
  ~Flusher_() { flush(); }
} io_flusher_;
}  // namespace io
using io ::putc;
using io ::read;
using io ::write;
int l[100005], r[100005], w[100005], t, first[100005], second[100005];
pair<pair<int, int>, pair<int, int> > qwq[500005];
struct smt {
  int sum;
  int ls, rs;
  smt *lf, *rf;
  smt(int la, int ra) {
    sum = 0;
    ls = la;
    rs = ra;
    lf = rf = 0;
  }
  void add(int first, int second) {
    if (ls == rs) {
      sum += second;
      return;
    }
    if (first <= (lf ? lf : (lf = new smt(ls, (ls + rs) >> 1)))->rs)
      (lf ? lf : (lf = new smt(ls, (ls + rs) >> 1)))->add(first, second);
    else
      (rf ? rf : (rf = new smt(((ls + rs) >> 1) + 1, rs)))->add(first, second);
    sum = (lf ? lf : (lf = new smt(ls, (ls + rs) >> 1)))->sum +
          (rf ? rf : (rf = new smt(((ls + rs) >> 1) + 1, rs)))->sum;
  }
  int query(int la) {
    if (ls == la) return sum;
    if ((rf ? rf : (rf = new smt(((ls + rs) >> 1) + 1, rs)))->ls <= la)
      return (rf ? rf : (rf = new smt(((ls + rs) >> 1) + 1, rs)))->query(la);
    return (lf ? lf : (lf = new smt(ls, (ls + rs) >> 1)))->query(la) +
           (rf ? rf : (rf = new smt(((ls + rs) >> 1) + 1, rs)))->sum;
  }
};
smt *a, *b;
int ans[100005], w1[300005], w2[300005];
signed main() {
  int n, m, s = 0, s1 = 0, s2 = 0;
  read(n, m);
  for (int i = 1; i <= n; ++i) {
    read(l[i]);
  }
  for (int i = 1; i <= n; ++i) {
    read(r[i]);
  }
  for (int i = 1; i <= n; ++i) {
    read(w[i]);
  }
  for (int i = 1; i <= n; ++i) {
    qwq[++t] = make_pair(make_pair(l[i], 1), make_pair(w[i] - l[i], 1));
    qwq[++t] = make_pair(make_pair(r[i] + 1, 1), make_pair(w[i] - l[i], -1));
    qwq[++t] = make_pair(make_pair(l[i], 2), make_pair(l[i] + w[i] - 1, -1));
    qwq[++t] = make_pair(make_pair(r[i] + 1, 2), make_pair(l[i] + w[i] - 1, 1));
    w1[++s] = w[i] - l[i];
    w2[s] = l[i] + w[i] - 1;
  }
  for (int i = 1; i <= m; ++i) {
    read(first[i]);
  }
  for (int i = 1; i <= m; ++i) {
    read(second[i]);
    qwq[++t] = make_pair(make_pair(first[i], 3), make_pair(second[i], i));
    w1[++s] = second[i] - first[i];
    w2[s] = first[i] + second[i];
  }
  sort(w1 + 1, w1 + s + 1);
  s1 = unique(w1 + 1, w1 + s + 1) - w1 - 1;
  sort(w2 + 1, w2 + s + 1);
  s2 = unique(w2 + 1, w2 + s + 1) - w2 - 1;
  sort(qwq + 1, qwq + t + 1);
  a = new smt(1, s1);
  b = new smt(1, s2);
  for (int i = 1; i <= t; ++i) {
    if (qwq[i].first.second == 1)
      a->add(lower_bound(w1 + 1, w1 + s1 + 1, qwq[i].second.first) - w1,
             qwq[i].second.second);
    else if (qwq[i].first.second == 2)
      b->add(lower_bound(w2 + 1, w2 + s2 + 1, qwq[i].second.first) - w2,
             qwq[i].second.second);
    else {
      ans[qwq[i].second.second] =
          a->query(lower_bound(w1 + 1, w1 + s1 + 1,
                               qwq[i].second.first - qwq[i].first.first) -
                   w1) +
          b->query(lower_bound(w2 + 1, w2 + s2 + 1,
                               qwq[i].second.first + qwq[i].first.first) -
                   w2);
    }
  }
  for (int i = 1; i <= m; ++i) write(ans[i], i == m ? '\n' : ' ');
  return 0;
}