Does anybody know how to make a program in Pascal with this task?
Task :: MaxGCD
For given n integers, you have to find the pair that has the greatest GCD (greatest common divider).
INPUT:
the first line of the standard input will contain the number n, and the next n lines will contain the number, each being at most 1 000 000 000. n 1 000.
OUTPUT:
To the standard output, write the GCD of the pair that has the biggest GCD.
Input:
6
9
6
391
8
24
60
Output:
12
Input:
2
71
16899
Output:
1