import sys
def main():
    ans = [0] * 2
    for line in sys.stdin:
        try:
            a,b,c = map(int, line.split())
            if a ** 2 + b ** 2 == c ** 2:
                ans[0] += 1
            else:
                ans[1] += 1

            for a in ans:
                print(a)

        except EOFError:
            for a in ans:
                print(a)


if __name__ == "__main__":
    main()