#include <iostream>
#include <numeric>
#include <climits>
using namespace std;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(nullptr);
int n;
while(cin >> n){
int xmax = INT_MIN;
int xmin = INT_MAX;
int x;
for(int i = 0; i < n; i++){
cin >> x;
xmax = max(x, xmax);
xmin = min(x, xmin);
}
int a = gcd(xmax, xmin);
cout << xmin << " " << xmax << " " << a << "\n";
}
return 0;
}

京公网安备 11010502036488号