cf/mirror

Non-coprime Split

CF
1872C1100· newbie1s256 MB⌨ stdin/stdout

Examples

Sample 1of 1multi-test • hover to link
Input
11
11 15
1 3
18 19
41 43
777 777
8000000 10000000
2000 2023
1791791 1791791
1 4
2 3
9840769 9840769
Output
6 9
-1
14 4
36 6
111 666
4000000 5000000
2009 7
-1
2 2
-1
6274 9834495
1872C.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)