#include <bits/stdc++.h>
using namespace std;
double x,ln,nn,i,n;
int main()
{
cin>>n;
cin>>x;
ln=x;
nn=x;
for (i=1; i<n;i++)
{
cin>>x;
ln=max(ln,x);
nn=min(nn,x);
}
cout<<"So lon nhat la:"<<fixed<<setprecision(2)<<ln<<endl;
cout<<"So nho nhat la:"<<fixed<<setprecision(2)<<nn;
return 0;
}