Three days ago, Rufo had an array . However, his friend Osman's girlfriend was angry that Osman was spending all his time with Rufo instead of her. Out of spite, she wanted to delete Rufo's array. Since she doesn't know much about computer science, she asked you to do it for her.
Knowing Rufo's skills, you decided not to erase the array completely. Instead, you modified it into a new array using a secret positive integer (1 \le x \le 10^9) and the following rule for each element a_i:
If a_i > x and a_i \cdot (x - 1) > x , then b_i = a_i \cdot (x - 1)
Otherwise, b_i = x
Now Rufo is furious and wants to understand what happened. if more than a solution exists print -1 , make sure to handle this case! Given the initial array and the modified array , find the secret integer you used. If multiple answers exist, print any. If it's impossible, print .
Each test contains multiple test cases. The first line contains the number of test cases t (1 \le t \le 10^4). The description of the test cases follows.
The first line of each test case contains a single integer n(1 \le n \le 2 \cdot10^5) — arrays's size.
The second line of each test case contains integers a_{1},a_{2},…,a_{n} (1 \le a_{i} \le 10^9) — the integers of Rufo's array.
The third line of each test case contains integers b_{1},b_{2},…,b_{n} (1 \le b_{i} \le 10^9) — the integers of the our array.
It is guaranteed that the sum of over all test cases does not exceed 2⋅10^5.
Output the . If there is multiple answers you can output any, if there is no answer print .
Example 1
Subtask ( points) : No additional constraints