#include<stdio.h>
int main()
{
long long int a,b,c,d,e,i,max=0,min=0;
scanf("%lld %lld %lld %lld %lld",&a,&b,&c,&d,&e);
for (i=1;i<=5;i++)
{
//max===================================
if (max<a)
{
max=a;
}
else if (max<b)
{
max=b;
}
else if (max<c)
{
max=c;
}
else if (max<d)
{
max=d;
}
else if (max<e)
{
max=e;
}
//min=======================================
if (min>a)
{
min=a;
}
else if (min>b)
{
min=b;
}
else if (min>c)
{
min=c;
}
else if (min>d)
{
min=d;
}
else if (min>e)
{
min=e;
}
}
printf("%lld\n%lld",max,min);
}
*/
#include<stdio.h>
int main()
{
double a,b,c,d,e;
int i;
scanf("%lf %lf %lf %lf %lf",&a,&b,&c,&d,&e);
for (i=0;i<=5;i++)
{
if ()
}
}



