line = $stdin.read
point = line.split(" ")
#p(point)
point.map! do |element|
	element.to_i
end
point.shift()
#p(point)
cnt = Hash.new
s = 0
c = 0
point.each { |var|
	for i in 0..7 do
		if 400*i <= var && var < 400*(i+1)
			cnt[i] = 1
			#print("ctn add at #{i} #{var}\n")
			break
		elsif var >= 3200
			s +=1
			#print("over \n")
			break
		end
	end
}
cnt.each_value do |value|
	c += value
end

if c == 8
	min = 8
	max = 8
elsif c >= 1
	min = c
	max = c + s
elsif c == 0
	min = 1 
	max = c + s
end

if max <= 8
	print("#{min} #{max}\n")
else
	print("#{min} 8\n")	
end

