Problem : https://mirror.codeforces.com/problemset/problem/1040/B
Solution : https://mirror.codeforces.com/contest/1040/submission/91739502
It is mentioned in the problem statement that for test case 2 answer 2 5 is also correct but the jury is saying it wrong. Why is it so? Can someone help?
The answer is
2
2 5
OR
2
1 4
But your program has the output:
1
2 5