import java.io.*;import java.util.*;class Main{public static void main(String[]a)throws Exception{int i,h,x=0,y=0,t[]=new int[3];Set<Integer> H=new HashSet<Integer>();BufferedReader B=new BufferedReader(new InputStreamReader(System.in));for(String s;(s=B.readLine())!=null;){a=s.split(",");for(i=0;i<3;)t[i]=Integer.valueOf(a[i++]);Arrays.sort(t);h=Arrays.hashCode(t);if(!H.contains(h)&&t[0]==t[1])y++;if(!H.contains(h)&&t[0]*t[0]+t[1]*t[1]==t[2]*t[2])x++;if(!H.add(h))H.remove(h);}System.out.println(x+"\n"+y);}}
