Go: package main

import (
	"bufio"
	"os"
	"strings"
	"strconv"
	"fmt"
)

func main() {
	scanner := bufio.NewScanner(os.Stdin)
	d := 0
	e := 0
	for scanner.Scan() {
		info := strings.Split(scanner.Text(), ",")
		a, _ := strconv.Atoi(info[0])
		b, _ := strconv.Atoi(info[1])
		c, _ := strconv.Atoi(info[2])
		if a*a + b*b == c*c {
			d++
		}
		if a == b {
			e++
		}
	}
	fmt.Println(d)
	fmt.Println(e)
}

C++: #include <iostream>
#include <vector>
#include <queue>
#include <stack>
#include <map>
#include <set>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <cstdlib>
#include <functional>
#include <string>
#include <algorithm>
#include <climits>
#include <utility>

#define PRINT(STR) cout << STR << endl;
#define REP(i, n) for (int (i) = 0; (i) < (int)(n); (i)++)
#define REG(i, a, b) for (int (i) = ((int)(a)); (i) < ((int)(b)); i++)
#define ALL(V) (V).begin(), (V).end()
#define SPACE " "

typedef long long ll;

using namespace std;

int nextInt() { int n = -1; cin >> n; return n; }
double nextDouble() { double d = -1; cin >> d; return d; }
ll nextll() { ll n = -1; cin >> n; return n; }
string nextString() { string str; cin >> str; return str; }

int INF = 1LL << 25;
double EPS = 1e-9;
int numofbits(int bits)
{
    bits = (bits & 0x55555555) + (bits >> 1 & 0x55555555);
    bits = (bits & 0x33333333) + (bits >> 2 & 0x33333333);
    bits = (bits & 0x0f0f0f0f) + (bits >> 4 & 0x0f0f0f0f);
    bits = (bits & 0x00ff00ff) + (bits >> 8 & 0x00ff00ff);
    return (bits & 0x0000ffff) + (bits >>16 & 0x0000ffff);
}

// BEGIN //////////////////////////////////////////////////////////////
int main() {
  int x[3];
  int a = 0, b = 0;
  while (scanf("%d,%d,%d", x, x+1, x+2) != EOF) {
    if (x[0] * x[0] + x[1] * x[1] == x[2] * x[2]) {
      a++;
    } else if (x[0] == x[1]) {
      b++;
    }
  }
  cout << a << endl << b << endl;
	return 0;
}
// END   //////////////////////////////////////////////////////////////

C++: #include <bits/stdc++.h>

using namespace std;

#define FOR(i,a,b) for(int i=(a);i<(b);i++)
#define REP(i,a) FOR(i,0,a)

int main(){
	int a,b,c;
	int u=0,v=0;
	while (scanf("%d,%d,%d",&a,&b,&c)!=EOF){
		if (a*a+b*b==c*c){
			u++;
		}
		if (a==b){
			v++;
		}
	}
	printf("%d\n%d\n",u,v);
	return 0;
}

C++: #include<iostream>
#include<cstdio>
using namespace std;

int main()
{
	int a, b, c;
	int r = 0;
	int l = 0;
	while (scanf("%d,%d,%d", &a, &b, &c) == 3 ) {
		if (a*a + b*b == c*c) {//??´?§?????§???¢
			r++;
		}
		else if (a == b) {//?????????????§???¢
			l++;
		}
	}
	cout << r << endl;
	cout << l << endl;
	
    return 0;
}

C++: #include<iostream>
using namespace std;

int main() {
	int a, b, c;
	char r;
	int rec, loz;
	while (cin >> a >> r >> b >> r >> c){
		if (a == b){
			loz += 1;
		}else if (a * a + b * b == c * c){
			rec += 1;
		}
	}
	cout << rec << endl << loz << endl;
}

C++: #include <iostream>
using namespace std;

int main() {

  long long int in_0, in_1, in_2;
  char in_c;

  long long int ans_0 = 0;
  long long int ans_1 = 0;

  while( cin >> in_0 >> in_c >> in_1 >> in_c >> in_2 ) {
    if ( in_0 * in_0 + in_1 * in_1 == in_2 * in_2 ) {
      ans_0++;
    }
    if ( in_0 == in_1 ) {
      ans_1++;
    }
  }
  cout << ans_0 << endl << ans_1 << endl;

  return 0;

}

C++: #include <iostream>
#include <cstdio>
#include <string>
#include <cstdlib>
#include <algorithm>
using namespace std;
#define rep2(x,from,to) for(int x = (from); x < (to); ++(x))
#define rep(x,to) rep2(x,0,to) 
int main() {
	string s;
	int x=0, y=0;
	while(cin >> s) {
		int a[3];
		int p = s.find(",", 0);
		int q = s.find(",", p + 1);
		a[0] = atoi(s.substr(0, p).c_str());
		a[1] = atoi(s.substr(p + 1, q - p).c_str());
		a[2] = atoi(s.substr(q + 1).c_str());
		sort(a, a+2);
		if(a[0] * a[0] + a[1] * a[1] == a[2] * a[2]) x++;
		else if(a[0] == a[1]) y++;
	}
	cout << x << endl;
	cout << y << endl;
	return 0;
}

C++: #include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <cstring>
#include <map>
#include <queue>
#include <stack>
#include <set>
#include <functional>
#include <sstream>
#include <complex>
#include <climits>
using namespace std;

#define REP(i,a,n) for(int i=(a);i<(int)(n);i++)
#define rep(i,n) REP(i,0,n)
#define pb push_back
#define mp make_pair
#define all(x) x.begin(),x.end()
#define EPS 1e-8

int main(){
	int a,b,c,hisi=0,chou=0;
	while(~scanf("%d,%d,%d",&a,&b,&c)){
		if( a==b ){
			if( a>c ){
				if( b+c>a )hisi++;
			}else{
				if( a+b>c )hisi++;
			}
		}
		else if( a*a+b*b==c*c )chou++;
	}
	printf("%d\n%d\n",chou,hisi);
	return 0;
}

C++: #include <iostream>
using namespace std;

int main(){
	cin.tie(0);
	ios::sync_with_stdio(false);

	int rect = 0;
	int loze = 0;

	int a, b, c;
	char c1, c2;

	while(cin >> a >> c1 >> b >> c2 >> c)
{		if(a * a + b * b == c * c){
			rect++;
		} 
		if(a == b){
			loze++;
		}
	}

	cout << rect << endl;
	cout << loze << endl;

	return 0;
}

C++:  
 #include<iostream>
 #include<stdio.h>
 #include<string>
 #include<math.h>
 #include<iomanip>
 #include<algorithm>
 #include<string.h>
 #include<cctype>
 #include<map>
 #include<set>
 #include<vector>
 #include<sstream>
 #include<stack>
 #include<queue>
 
 using namespace std;
  
 int main()
 {
   int a,b,c;
   int arr[100005][3];
   int count1=0;
   int count2=0;
   int count=0;
   char temp,temp1;
   bool flag;
   while(cin>>a>>temp>>b>>temp1>>c)
   {
     flag=false;
     arr[count][0]=a;
     arr[count][1]=b;
     arr[count][2]=c;
     sort(arr[count],arr[count]+3);
     a=arr[count][0];
     b=arr[count][1];
     c=arr[count][2];
     count++;
       for(int i=0;i<count-1;i++)
       {
         if(a==arr[i][0]&&b==arr[i][1]&&c==arr[i][2])
         {
           flag=true;
           break;                                            
         }        
       }             
       if(!flag) 
       {
         if(a*a+b*b==c*c) count1++;
         else count2++;          
       } 
      //if(count==4) break;                               
   }
   cout<<count1<<endl;
   cout<<count2<<endl;  
   //while(1);     
   return 0;  
 }

C++: #include <iostream>
#include <vector>
#include <stack>
#include <queue>
#include <map>
#include <set>
#include <string>
#include <math.h>
#include <functional>
#include <algorithm>
#include <utility>

typedef long long Int; 
#pragma warning(disable : 4996)
#define REP(i,n) for(int i = 0 ; i < n ; ++i)
#define REPS(a,i,n) for(int i = a ; i < n ; ++i)
using namespace std;




int main(){


	int a, b, c;
	int t(0), h(0);
	while (scanf("%d,%d,%d", &a, &b, &c) != EOF){
		if (a + b < c || a + c < b || b + c < a || !a || !b || !c)continue;


		if (a*a + b*b == c*c)
			++t;

		if (a == b)
			++h;

	}
	cout << t << endl << h << endl;

	return 0;
}