#include <iostream>
using namespace std;
const int INF = 0x7ffffff;
int gcd(int a, int b) {
if( b==0 ) return a;
return gcd(b, a%b);
}
int main() {
int n, num, minn = INF, maxn = -1;
cin >> n;
while(cin >> num) {
if(num > maxn) maxn = num;
if(num < m...