#include <bits/stdc++.h>
using namespace std;

int main(){
  int a, b, c; char x;
  int rectangle = 0, diamond = 0;
  while(cin >> a >> x >> b >> x >> c){
    if(a*a + b*b == c * c) rectangle++;
    if(a == b) diamond++;
  }

  cout << rectangle << endl;
  cout << diamond << endl;
}
  
  
