#include <iostream>
#include <vector>
#include <algorithm>
#include <map>
#include <string>
#include <stack>
#include <queue>
#include <cstdio>
#include <cmath>
#include <istream>
#include <sstream>
#include <iterator>

using namespace std;

typedef ostringstream OSS;
typedef istringstream ISS;

typedef pair<int,int> P_II;

#define REP(i,a,n) for(int i=a;i<n;i++)
#define rep(i,n) REP(i,0,n)

int main() {
  int a[100][3];
  int rect = 0, lozen = 0;
  map<string,bool> mp;
  OSS oss;
  
  for(int i = 0; scanf("%d,%d,%d", &a[i][0], &a[i][1], &a[i][2])!=EOF; i++) {
    sort(a[i], a[i]+3);
    oss << a[i][0] << "," << a[i][1] << "," << a[i][2];
    if(!mp[oss.str()]) {
      mp[oss.str()] = true;
      if(a[i][0]*a[i][0] + a[i][1]*a[i][1] == a[i][2]*a[i][2]) rect++;
      else lozen++;
    }
    oss.str("");
  }
  cout << rect << endl << lozen << endl;
  
  return 0;
}