Two players are playing the game of deletion. plays with array A and plays with array B. The length of both the arrays are N.
The game is like this - both of them want to delete their respective arrays. A player can delete the array in multiple steps.
During one step, he chooses some numbers from the array and takes the bitwise OR of these numbers and remove these numbers from the array.
This bitwise OR is the cost incurred in deleting the selected numbers. This way he deletes his whole array.
The reward of deleting the entire array will be the sum of all numbers in the array minus the sum of the cost of all the steps.
The player with the maximum reward will win.
You have to print the winner along with the of reward he wins with. Let's say scored and scored and wins , then the margin will be .
Input
First line contains a number N . N is the length of the array.
Second line contains the N integers corresponding to elements of the array with .
Third line contains the N integers corresponding to elements of the array with .
Output
If wins, print 1 followed by a space and then the reward margin he wins with.
If wins, print 2 followed by a space and then the reward margin he wins with.
Print 1, if the game draws.
Input Constraints
Cost for deleting array A will be 3.
Cost for deleting array B will be 3.
Reward for Player1 will be 4 - 3 = 1.
Reward for Player2 will be 6 - 3 = 3.
Margin 3-1=2.
So, output would be 2 2.