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

import sys
import os


rectangle = 0
diamond = 0
parallelogram = 0

for s in sys.stdin:
    a, b, c = map(int, s.split(','))
    if a**2 + b**2 == c**2:
        rectangle += 1
    elif a == b:
        diamond += 1
    else:
        parallelogram += 1

print(rectangle)
print(diamond)