#!/usr/bin/env python
# coding: utf-8

import sys


def is_rectangle(side_a, side_b, diagonal):
    if side_a == side_b:
        return False
    return (side_a ** 2 + side_b ** 2) == diagonal ** 2


def is_rhombus(side_a, side_b, diagonal):
    if side_a != side_b:
        return False
    elif (side_a ** 2 + side_b ** 2) == diagonal ** 2:
        return False
    else:
        return True


def main():
    params = [[int(x) for x in line.split(",")] for line in sys.stdin.readlines()]
    rectangles = 0
    rhombuses = 0
    for param in params:
        if is_rectangle(*param):
            rectangles += 1
        elif is_rhombus(*param):
            rhombuses += 1

    print rectangles
    print rhombuses


if __name__ == '__main__':
    main()