Maximum GCD of all pairs

I was thinking of problem : BYTES4 Problem - CodeChef

Given N integers, output the maximum value of GCD for all the pairs possible.
How to approach this question?
Please Help.

@gorv editorial posted .

EDITORIAL BYTES4 - TODO EN UNO - general - CodeChef Discuss [GCD,Seive]