import math

if __name__ == "__main__":
    rectangle = 0
    diamond = 0
    while True:
        try:
            x,y,z = map(int,raw_input().split(","))

            if x == y:
                diamond += 1

            if (pow(x,2)+pow(y,2)) == pow(z,2):
                rectangle += 1

        except EOFError:
            break

    print rectangle
    print diamond