#include <iostream>
#include <cmath>
using namespace std;
int main() {
int p=0; //пирожки
int n, k; //количество детей, вес и упаковки молока
double m, u, w;
cin >> n;
m=0.2; u=0.9;
for(int i=0; i<n; i++) {
cin >> w;
if (w<30) p++;
if(w>=30) p=p+0;
}
k= ceil(p*m/u);
cout << k << " " << p;
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8Y21hdGg+CnVzaW5nIG5hbWVzcGFjZSBzdGQ7CgppbnQgbWFpbigpIHsKCWludCBwPTA7IC8v0L/QuNGA0L7QttC60LgKCWludCBuLCBrOyAvL9C60L7Qu9C40YfQtdGB0YLQstC+INC00LXRgtC10LksINCy0LXRgSDQuCDRg9C/0LDQutC+0LLQutC4INC80L7Qu9C+0LrQsAoJZG91YmxlIG0sIHUsIHc7IAoJY2luID4+IG47CgltPTAuMjsgdT0wLjk7Cglmb3IoaW50IGk9MDsgaTxuOyBpKyspIHsKCQljaW4gPj4gdzsKCQlpZiAodzwzMCkgcCsrOwoJCWlmKHc+PTMwKSBwPXArMDsKCX0KCWs9IGNlaWwocCptL3UpOwoJY291dCA8PCBrIDw8ICIgIiA8PCBwOwoJcmV0dXJuIDA7Cn0=