Relocation
Miss M lives on the planet Bitaqulandia and has decided to move from the country of Derzhprodiya to Tobolyandia.
For now, she has decided to move her four most important items. To transport them, she has chosen to use two boxes, where she will place all the items. It is known that the -th item weighs kilograms and is located in the -th box.
She will need to move the boxes one at a time, so she would very much like the boxes to not be too heavy. That is, she wants the maximum possible weight of a box to be as small as possible. Since she doesn't have much time, she can only move one item from one box to another.
Help her make the move easier and find out which item needs to be moved!
Input
The first line contains four integers , , , () — the weights of each of the four items.
The second line contains four integers , , , () — the box numbers in which the corresponding items are located.
Output
Print a single integer () — the number of the item that needs to be moved to another box.
If there are several correct answers, you can print any of them.
If it is optimal to not change anything, then print a single integer "-1
".
Examples
Note
To achieve the minimum maximum possible weight after moving one item from one box to another, in the second example there is only one option. In the initial distribution of items across the boxes, the weights of the boxes are and . Consider all the options for moving items between boxes:
If you move item number weighing from the second box to the first, then the weights of the boxes will be and , .
If you move item number weighing from the first box to the second, then the weights of the boxes will be and , .
If you move item number weighing from the first box to the second, then the weights of the boxes will be and , .
If you move item number weighing from the second box to the first, then the weights of the boxes will be and , .
The first and second example from the problem statement.