>>83
#include <stdio.h>

int gcd(int a, int b) { return b ? gcd(b, a % b) : a; }
int lcm(int a, int b) { return a / gcd(a, b) * b; }

int main(void)
{
int i, n, max, min, l, g, temp;

scanf("%d", &n);
if(n < 1 || 32 < n) return 0;

scanf("%d", &g);
max = min = l = g;

for(i = 1; i < n; i++) {
scanf("%d", &temp);
if(max < temp) max = temp;
else if(min > temp) min = temp;
l = lcm(l, temp);
g = gcd(g, temp);
}

printf("最大:%d 最小:%d 最小公倍数:%d 最大公約数:%d\n", max, min, l, g);

return 0;
}