import java.util.*;
class MilkAndPatty {
public static void main
(String[] args
) { Scanner in
= new Scanner
(System.
in); int n = in.nextInt(); // количество учеников
int k; // пакеты молока
int p = 0; // пирожки
double m = 0.2, u = 0.9; // объем стакана/пачки молока
for(int i=0; i<n; i++) {
int w = in.nextInt(); // вес учеников
if (w<30) p++;
if(w>=30) p=p+0;
}
k
= (int)Math.
ceil(p
*m
/u
); System.
out.
print(k
+ " " + p
); }
}
aW1wb3J0IGphdmEudXRpbC4qOwoKY2xhc3MgTWlsa0FuZFBhdHR5IHsKICAgIHB1YmxpYyBzdGF0aWMgdm9pZCBtYWluKFN0cmluZ1tdIGFyZ3MpIHsKICAgICAgICBTY2FubmVyIGluID0gbmV3IFNjYW5uZXIoU3lzdGVtLmluKTsKICAgICAgICBpbnQgbiA9IGluLm5leHRJbnQoKTsgICAgLy8g0LrQvtC70LjRh9C10YHRgtCy0L4g0YPRh9C10L3QuNC60L7QsgogICAgICAgIGludCBrOyAgICAgICAgICAgICAgICAgICAvLyDQv9Cw0LrQtdGC0Ysg0LzQvtC70L7QutCwCiAgICAgICAgaW50IHAgPSAwOyAgICAgICAgICAgICAgIC8vINC/0LjRgNC+0LbQutC4CiAgICAgICAgZG91YmxlIG0gPSAwLjIsIHUgPSAwLjk7IC8vINC+0LHRitC10Lwg0YHRgtCw0LrQsNC90LAv0L/QsNGH0LrQuCDQvNC+0LvQvtC60LAKICAgICAgICBmb3IoaW50IGk9MDsgaTxuOyBpKyspIHsKICAgICAgICAgICAgaW50IHcgPSBpbi5uZXh0SW50KCk7IC8vINCy0LXRgSDRg9GH0LXQvdC40LrQvtCyCiAgICAgICAgICAgIGlmICh3PDMwKSBwKys7CiAgICAgICAgICAgIGlmKHc+PTMwKSBwPXArMDsKICAgICAgICB9CiAgICAgICAgayA9IChpbnQpTWF0aC5jZWlsKHAqbS91KTsKICAgICAgICBTeXN0ZW0ub3V0LnByaW50KGsgKyAiICIgKyBwKTsKICAgIH0KfQ==