Two distinct positive integers not exceeding are fixed. It is guaranteed that .
Dadas knows only the value of . Mog knows only the value of . Both people know and all rules of the problem.
Starting from day , both people simultaneously make exactly one of the following statements every day.
- If the person can determine the two integers uniquely, the person says I know.
- Otherwise, the person says I do not know.
Before speaking, each person knows every statement made by both people on all previous days. A statement made by the other person on the current day cannot be used to decide the current statement. Every statement is truthful.
Find the first day on which at least one person says I know. If this never happens, find .
Input
The input is given from Standard Input in the following format:
Each case is given in the following format:
Output
For each test case, print the first day on which at least one person says I know.
If this never happens, print .
Constraints
- .
- .