def main():
    Rec = 0
    Dia = 0
    while True:
        try:
            a,b,c = map(int,input().split(","))
            if a == b:
                Dia += 1
            elif a**2 + b**2 == c**2:
                Rec += 1
        except EOFError:
            break
    print('{}\n{}'.format(Rec,Dia))

if __name__ == '__main__':
    main()
