# Aizu Problem 0032: Plastic Board
#
import sys, math, os

# read input:
PYDEV = os.environ.get('PYDEV')
if PYDEV=="True":
    sys.stdin = open("sample-input.txt", "rt")

rectangles, lozenges = 0, 0
while True:
    try:
        a, b, c = [int(_) for _ in input().split(',')]
    except EOFError:
        break
    if a**2 + b**2 == c**2:
        rectangles += 1
    elif a == b:
        lozenges += 1

print(rectangles)
print(lozenges)