#include<iostream>
#include<stdio.h>
using namespace std;

int main(){
int l1,l2,d,n=0,m=0;

while(scanf("%d,%d,%d",&l1,&l2,&d)+1){
if(l1==l2)++n;
else if(l1*l1+l2*l2==d*d)++m;
}
cout<<m<<endl<<n<<endl;

}