# -*- coding: utf-8 -*-

import sys

def isRec(a, b, c):
    if a*a + b*b == c*c:
        return True
    return False

def isLoz(a, b, c):
    if a == b:
        return True
    return False

count_Rec = 0
count_Loz = 0
for line in sys.stdin:
    a, b, c = map(int, line.split(','))
    if isRec(a, b, c):
        count_Rec += 1
    if isLoz(a, b, c):
        count_Loz += 1
print count_Rec
print count_Loz