The first line contains a single integer--- the number of pairs.
Thenlines follow, each line contains two integers
--- the
-th pair you are given.
Outputlines, the
-th line contains a single integer, which means the minimum value of
. You can choose different
for different
.