4680: B3754 [信息与未来 2019] 鸡兔同笼
Memory Limit:128 MB
Time Limit:1.000 S
Judge Style:Text Compare
Creator:huangyaoying
Submit:0
Solved:0
Description

Input

Output

Sample Input Copy
4
6 12
6 21
6 24
12345 40000
Sample Output Copy
0 0
3 4
6 6
2965 7655
HINT
