# coding: utf-8

rectangle = 0
lozenge = 0


while (str = STDIN.gets)!=nil do
	str.delete!("\n")
	edges = str.split(",")

	#print "#{edges}\n"

	edges.map!{|edge| edge.to_i}



	sum = edges[0]**2 + edges[1]**2

	if sum == edges[2]**2 then
			rectangle += 1
	elsif edges[0] == edges[1] then
			lozenge += 1
	end

end

print "#{rectangle} \n#{lozenge} \n"