Hide
Problem E
Chinese Remainder Theorem (non-relatively prime moduli)
Input
The first line of input consists of an integers
Output
For each test case, output two integers
Sample Input 1 | Sample Output 1 |
---|---|
3 10000 23000 9000 23000 10000 23000 10000 23000 1234 2000 746 2002 |
no solution 10000 23000 489234 2002000 |