/*
#include<stdio.h>
int main()
{
int a[101];
int i,max1=0,max2=0,plus=0;
for (i=1;i<=7;i++)
{
scanf("%d",&a[i]);
if(a[i]%2==0)
{
if (max1<a[i])
{
max1=a[i];
}
}
else
{
if (max2<a[i])
{
max2=a[i];
}
}
}
plus=max1+max2;
printf("%d",plus);
return 0;
}
*/
/*
void qs(int s,int e)
{
if(s>=e)
{
return ;
}
int pivot = s;
int left=s,right=e;
int temp;
while(left<right)
{
while(a[pivot]>a[left])
{
left++;
}
while (a[pivot]<a[right])
{
right--;
}
if(left<right)
{
temp = a[left];
a[left] = a[right];
a[right] = temp;
}
}
if(pivot>right)
{
temp = a[pivot];
a[pivot] = a[right];
a[right] = temp;
}
qs(s,right-1);
qs(right+1,e);
}
#include<stdio.h>
int a[100001];
int compare(int* x,int* y){
if ((*x)>(*y)) return 1;
else return -1;
}
int main()
{
int n,i;
scanf ("%d",&n);
for (i=0;i<n;i++)
{
scanf("%d",&a[i]);
}
qsort (a,n,sizeof(int),compare);
for (i=0;i<n;i++)
{
printf("%d\n",a[i]);
}
}
#include<stdio.h>
int main()
{
int a[101];
int n,i,max=0,min=100,temp;
scanf("%d",&n);
for (i=1;i<=n;i++)
{
scanf("%d",&a[i]);
if(max<a[i])
{
max=a[i];
}
if(min>a[i])
{
min=a[i];
}
}
printf("%d %d",max,min);
return 0;
}
*/