a = [int(i) for i in input().split()]
ac =[]
rate = [i*400 for i in range(1,10)]

for i in a:
	for j in reversed(rate):
		if i >= j:
			ac.append(j)
			break

TT = ac.count(3200)
NTT = [i for i in ac if i != 3200]
lenNTT = len(set(NTT))
if TT+lenNTT >= 8:
	cmax = 8; cmin = lenNTT
else:
	cmax = TT+lenNTT; cmin = lenNTT
print(cmin,cmax)