Plastic Board

Time Limit : 1 sec, Memory Limit : 65536 KB
Japanese version is here

Plastic Board

A factory is using a machine which reads side length and diagonal length and molds a plastic board. This factory molds many different size of paralllelograms. You are ordered to count the number of produced rectangles and lozenges.

Write a program which reads the sizes to be read by the machine and outputs the number of produced rectangles and lozenges.


Input

Input is given in the following format.

a1,b1,c1
a2,b2,c2
:

Each line includes lengths of the two adjoined sides ai and bi and the diagonal ci of the i-th parallelogram (1 ≤ ai, bi, ci ≤ 1000, ai + bi > ci). These lengths are given in integers and separated by a comma.

Output

Print the number of produced rectangles in the first line.
Print the number of produced lozenges in the second line.

Sample Input

3,4,5
5,5,8
4,4,4
5,4,3

Output for the Sample Input

1
2

Source: PC Koshien 2004 , All-Japan High School Programming Contest, Aizu-Wakamatsu, Japan, 2004
http://www.pref.fukushima.jp/pc-concours/