def rect((a,b,c)):
    #a,b,c = sorted([a,b,c])
    if a**2 + b**2 == c**2:
        return True
    else:
        return False
def diam((a,b,c)):
    if a == b or b == c or c == a:
        return True
    else:
        return False

ls = []
while True:
    try:
        a,b,c = map(int,raw_input().split(','))
        ls.append((a,b,c))
    except:
        break
        
rec = 0; dia = 0
for k in range(len(ls)):
    if rect(ls[k]):
        rec +=1
    if diam(ls[k]):
        dia +=1
print rec
print dia