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

import sys


count1 = count2 = 0
for s in sys.stdin:
  d = map(int,s.split(","))
  if d[2]**2 == d[0]**2 + d[1]**2:
    count1 += 1
  if d[0] == d[1]:
    count2 +=1

print count1
print count2