Match makers : HackerEarth Problem Solution

Match makers : HackerEarth Problem Solution

Input:


2
4
1 6 9 12
4 12 3 9
4
2 2 2 2
2 2 2 2

Output:

2
4

Implementation: