#include <iostream>
#include<bits/stdc++.h>
using namespace std;
int main() {
// your code goes here
int n;
cin>>n;
int a[n];
for(int i=0;i<n;i++){
cin>>a[i];
}
int max1=*max_element(a,a+n);
int min1=*min_element(a,a+n);
cout<<max1<<"-->"<<min1;
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZTxiaXRzL3N0ZGMrKy5oPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKaW50IG1haW4oKSB7CgkvLyB5b3VyIGNvZGUgZ29lcyBoZXJlCglpbnQgbjsKCWNpbj4+bjsKCWludCBhW25dOwoJZm9yKGludCBpPTA7aTxuO2krKyl7CgkJY2luPj5hW2ldOwoJfQoJaW50IG1heDE9Km1heF9lbGVtZW50KGEsYStuKTsKCWludCBtaW4xPSptaW5fZWxlbWVudChhLGErbik7Cgljb3V0PDxtYXgxPDwiLS0+Ijw8bWluMTsKCXJldHVybiAwOwp9