#P2093. Gcd Product

Gcd Product

题目描述

点击这里查看pdf

Give you , you need to calculate:

Because the output may be too large, let AnsiAns_i denote Ci mod 998244353C_i~mod~998244353, you only need to output Ans1 xor Ans2 xor ... xor AnsnAns_1~xor~Ans_2~xor~...~xor~Ans_n

输入格式

The first line has one integer nn.

The second line has nn integers a1...na_{1...n}.

The third line has nn integers b1...nb_{1...n}.

1leqnleq5 imes1051\\leq n\\leq 5\ imes 10^5

0leqai,bi<9982443530\\leq a_i,b_i<998244353

输出格式

Output the answer.

样例

6 
1 2 3 4 5 6 
6 5 4 3 2 1 

88 

提示

Form ICPC2020济南站