### Problem Statement

Xing Yang has `N` toys, each of which with a type T_{i}

He also has `N` displays, each of which can only hold a toy type D_{i}

In 1 operation, he can replace the type of toy `i` T_{i} with the value `K`, where `K` is the XOR of the types of all toys.

Determine if XY can make the types of all toys such that T_{i} = D_{i} for all toys, and find how many operations he will require.

### Constraints

`2 ≤ N ≤ 10`^{5}
`T`_{i} and `D`_{i} are integers.
`0 ≤ T`_{i}, D_{i} < 2^{30}

### Input

Input is given from Standard Input in the following format:

`N`
`T`_{1} `T`_{2} `...` `T`_{N}
`D`_{1} `D`_{2} `...` `D`_{N}

### Output

If the objective is achievable, print the minimum necessary number of operations.
Otherwise, print `-1`

instead.

### Sample Input 1

3
0 1 2
3 1 0

### Sample Output 1

2

At first, the XOR of all the elements of `a` is `3`.
If we replace `T`_{1} with `3`, `T` becomes `(3, 1, 2)`.

Now, the XOR of all the elements of `a` is `0`.
If we replace `T`_{3} with `0`, `T` becomes `(3, 1, 0)`, which matches `b`.

### Sample Input 2

3
0 1 2
0 1 2

### Sample Output 2

0

### Sample Input 3

2
1 1
0 0

### Sample Output 3

-1

### Sample Input 4

4
0 1 2 3
1 0 3 2

### Sample Output 4

5