Calculate the Sum Modulo m

Operations on a graphics card (a GPU) are very parallelizable. So, if it’s possible to perform the same type of operation on many numbers simultaneously, it would be faster than performing different types of operations. The team is currently testing their code, so they ask you to write a program that would validate an addition of many numbers modulo a different number.

Given two lists of integers a1,a2,...,ana_1, a_2, ..., a_n and b1,b2,...,bnb_1, b_2, ..., b_n, you are asked to calculate the sum of each pair aia_i and bib_i modulo mim_i:

(ai+bi)mod  mi(a_i + b_i) \mod m_i

Note that different languages implement the modulo operation differently. Python always makes sure that the result is positive. Yet, languages like C++ can give negative results after modulo (-3 % 2 → -1). A very popular trick is to add the modulo m to the result if it’s negative with an if statement. A more generic way of handling such cases is by adding m and taking the modulo again: ((a % m) + m) % m. This would make sure that the result is always positive.

Input

The first line of the input contains a single integer n (1 ≤ n ≤ 100 000) the number of elements.

The second line contains n space-separated integers a1,a2,...,ana_1, a_2, ..., a_n (−109-10^9 ≤ aia_i ≤ 10910^9).

The next line contains n space-separated integers b1,b2,...,bnb_1, b_2, ..., b_n (−109-10^9 ≤ bib_i ≤ 10910^9).

The last line contains n space-separated integers m1,m2,...,mnm_1, m_2, ..., m_n (1 ≤ mim_i ≤ 10910^9).

Output

The program should print n space-separated integers - (ai+bi)mod  mi(a_i + b_i) \mod m_i.

Examples

Input

Output

3
1 2 1
3 4 1
2 5 3

0 1 2

Explanation

  1. (1+3)mod  2=4mod  2=0(1 + 3) \mod 2 = 4 \mod 2 = 0

  2. (2+4)mod  5=6mod  5=1(2 + 4) \mod 5 = 6 \mod 5 = 1

  3. (1+1)mod  3=2mod  3=2(1 + 1) \mod 3 = 2 \mod 3 = 2

Constraints

Time limit: 1.6 seconds

Memory limit: 512 MB

Output limit: 1 MB