/*
#include <stdio.h>//1420 : 3등 찾기
typedef struct
{
int s;
char n[20];
}score;
int main()
{
int i,j,k;
score temp,a[51]={};
scanf("%d\n",&k);
for(i=0; i<k; i++){
scanf("%s %d",a[i].n,&a[i].s);
}
for(i=0; i<k; i++){
for(j=0; j<k-i; j++){
if(a[j].s < a[j+1].s){
temp = a[j];
a[j] = a[j+1];
a[j+1] = temp;
}
}
}
printf("%s",a[2].n);
return 0;
}
*/
/*
#include <stdio.h>//4531 : 대표 값
int main()
{
int i,j,average=0,temp;
int a[11]={};
for(i=0; i<5; i++){
scanf("%d",&a[i]);
average+=a[i];
}
for(i=1; i<5; i++){
for(j=0; j<5-i; j++){
if(a[j]<a[j+1]){
temp = a[j];
a[j] = a[j+1];
a[j+1] = temp;
}
}
}
printf("%d\n%d",average/5,a[2]);
return 0;
}
*/
#include <stdio.h>//4536 : 대표값
int main()
{
int i,j,n,average=0,max=0;
int a[100]={};
for(i=0; i<10; i++){
scanf("%d",&n);
average+=n;
a[n/10]+=1;
}
for(i=1; i<=99; i++){
if(a[max]<a[i]){
max=i;
}
}
printf("%d\n%d",average/10,max*10);
return 0;
}