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 <algorithm>
#include <bitset>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <utility>
#include <vector>
#include <complex>
#include <string.h>
#include <numeric>
using namespace std;

//#define int long long
#define reps(i,s,n) for(int (i)=(s);(i)<(n);++(i))
#define rep(i,n) reps(i,0,n)
#define rept(i,n) rep(i,(n)+1)
#define repst(i,s,n) reps(i,s,(n)+1)
#define reprt(i,n,t) for(int (i)=(n);(i)>=(t);--(i))
#define repr(i,n) reprt(i,n,0)
#define each(itr,v) for(auto &(itr):(v))
#define all(c) (c).begin(),(c).end()
#define rall(c) (c).rbegin(),(c).rend()
#define pb push_back
#define mp make_pair
#define fi first
#define se second
#define tmax(x,y,z) max(x,max(y,z))
#define tmin(x,y,z) min(x,min(y,z))
#define chmin(x,y) x=min(x,y)
#define chmax(x,y) x=max(x,y)
#define ln '\n'
#define bln(i,n) (((i)==(n)-1)?'\n':' ')
#define dbg(x) cout<<#x" = "<<(x)<<ln<<flush
#define dbga(x,n) {cout<<#x" : ";for(int (i)=0;i<(n);++i){cout<<((x)[i])<<(i==((n)-1)?'\n':' ')<<flush;}}
#define zero(a) memset(a,0,sizeof(a))
#define unq(a) sort(all(a)),a.erase(unique(all(a)),a.end())

//typedef complex<double> P;
typedef long long ll;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef vector<string> vst;
typedef vector<pii> vpii;
typedef vector<pll> vpll;
typedef vector<vector<int> > mat;

const ll inf = (ll)1e9+10;
const ll linf = (ll)1e18+10;
const ll mod = (ll)(1e9+7);
const int dx[] = {0, 1, 0, -1};
const int dy[] = {1, 0, -1, 0};
const int ddx[] = {0, 1, 1, 1, 0, -1, -1, -1};
const int ddy[] = {1, 1, 0, -1, -1, -1, 0, 1};
const double eps = 1e-10;

ll mop(ll a,ll b,ll m=mod) {ll r=1;a%=m;for(;b;b>>=1){if(b&1)r=r*a%m;a=a*a%m;}return r;}
ll gcd(ll a,ll b) {return b?gcd(b,a%b):a;}
ll lcm(ll a,ll b) {return a*b/gcd(a,b);}
bool ool(int x,int y,int h,int w) {return((x<0)||(h<=x)||(y<0)||(w<=y));}
bool deq(double a,double b) {return abs(a-b)<eps;}

struct oreno_initializer {
	oreno_initializer() {
		cin.tie(0);
		ios::sync_with_stdio(0);
	}
} oreno_initializer;



int a, b, c, x, y;

signed main() {
	while (scanf("%d,%d,%d",&a,&b,&c)!=EOF) {
		if (a*a+b*b==c*c) x++;
		if (a==b) y++;
	}
	cout << x << endl << y << endl;
}

C++: #include<iostream>
#include<vector>
#include<stdio.h>
using namespace std;

int main(){
    int n,m,d,r=0,l=0;
    char c;
    while(cin>>n>>c>>m>>c>>d,n){
        if(n==m)
            l++;
        if(n*n+m*m==d*d)
            r++;
    }
    cout<<r<<endl<<l<<endl;
    return 0;
}

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

int main(){
	int a, b, c, ans1=0, ans2=0;

	while( scanf("%d,%d,%d", &a,&b,&c) != EOF ){
		if( a*a + b*b == c*c ) ans1++;
		else if( a == b ) ans2++;
	}
	printf("%d\n%d\n", ans1, ans2);
}

C++: #define _CRT_SECURE_NO_WARNINGS
#define _USE_MATH_DEFINES

#include "bits/stdc++.h"
#define REP(i,a,b) for(int i=a;i<b;++i)
#define rep(i,n) REP(i,0,n)
typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
#define ALL(a) begin(a),end(a)
#define ifnot(a) if(not (a))
#define dump(x)  cerr << #x << " = " << (x) << endl
using namespace std;

// #define int ll
#ifdef _MSC_VER
const bool test = true;
#else 
const bool test = false;
#endif

int dx[] = { 0,1,0,-1 };
int dy[] = { 1,0,-1,0 };
#define INF (1 << 28)
ull mod = (int)1e9 + 7;
//.....................
const int MAX = (int)2e5 + 5;

int main() {
	int a, b, c;
	int res1 = 0;
	int res2 = 0;
	while (scanf("%d,%d,%d", &a, &b, &c) != EOF) {
		if (c == (ll)(hypot(a, b) + 1e-8)) res1++;
		if (a == b) res2++;
	}
	cout << res1 << endl;
	cout << res2 << endl;
	return 0;
}

C++: #include<iostream>
#include<cstdio>
using namespace std;
int main(){
  int ans_a = 0, ans_b = 0;
  for(;;){
    int a,b,c;
    if(scanf("%d,%d,%d",&a,&b,&c) == EOF){break;}
    if(a*a+b*b == c*c){ans_a++;}
    if(a == b){ans_b++;}
  }
  cout <<ans_a<<endl<<ans_b<<endl;
  return 0;
}

C++: #define _USE_MATH_DEFINES

#include <iostream>
#include <string>
#include <sstream>
#include <iomanip>
#include <cmath>
#include <algorithm>
#include <utility>
#include <vector>
#include <numeric>

using namespace std;

int main()
{
	int rec = 0;
	int loz = 0;

	string s;
	for (; getline(cin, s);)
	{
		stringstream ss;
		ss << s;

		vector<int> a(3);
		for (int i = 0; i < 3; i++)
		{
			ss >> a.at(i);
			ss.ignore();
		}



		if (a.at(0) * a.at(0) + a.at(1) * a.at(1) == a.at(2) * a.at(2))
		{
			rec++;
		}
		else if (a.at(0) == a.at(1))
		{
			loz++;
		}
	}

	cout << rec << endl;
	cout << loz << endl;
}

C++: #include <iostream>
#include <cstdio>
#include <string>
#include <deque>
#include <list>
#include <queue>
#include <stack>
#include <vector>
#include <utility>
#include <algorithm>
#include <map>
#include <set>
#include <complex>
#include <cmath>
#include <limits>
#include <ctime>
using namespace std;

#define rep(i,a,n) for(int i=a; i<n; i++)
#define repr(i,a,n) for(int i=a; i>=n; i--)
#define pb(a) push_back(a)
#define fr first
#define sc second
#define INF 999999999

#define X real()
#define Y imag()
#define EPS (1e-10)
#define EQ(a,b) (abs((a) - (b)) < EPS)
#define EQV(a,b) ( EQ((a).X, (b).X) && EQ((a).Y, (b).Y) )
#define LE(n, m) ((n) < (m) + EPS)
#define GE(n, m) ((n) + EPS > (m))

typedef vector<int> VI;
typedef vector<VI> MAT;
typedef pair<int, int> pii;
typedef long long int ll;

typedef complex<double> P;
typedef pair<P, P> L;
typedef pair<P, double> C;

int const MOD = 1000000007;

int main() {
    int a[3];
    int ret_a = 0;
    int ret_b = 0;
    while(~scanf("%d,%d,%d",&a[0], &a[1], &a[2])) {
        if(a[0] * a[0] + a[1] * a[1] == a[2] * a[2]) ret_a++;
        if(a[0] == a[1]) ret_b++;
    }
    cout << ret_a << endl;
    cout << ret_b << endl;
    return 0;
}

C++: #include <algorithm>
#include <cstdio>
#include <iostream>
#include <map>
#include <cmath>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
#include <stdio.h>
#include <stdlib.h>
using namespace std;

#define pb         push_back
#define mp         make_pair
#define ll         long long
#define PI         acos(-1.0)
#define ALL(A)     ((A).begin(), (A).end())
#define vsort(v)   sort(v.begin(),v.end())
#define FOR(I,A,B) for(int I = (A); I < (B); ++I)

int main(){
    int a,b,c;
    int sq=0,hishi=0;
    while(scanf("%d,%d,%d\n",&a,&b,&c)){
        if(a*a+b*b==c*c) sq++;
        else if(a==b) hishi++;
    }
    cout << sq << endl;
    cout << hishi << endl;
}

C++: #include<bits/stdc++.h>
using namespace std;
int main(){
  int a,b,c,ans1=0,ans2=0;
  char x[3];
  while(cin >> a && a != EOF){
    cin >> x[0] >> b >> x[1] >> c;
    if( a*a + b*b == c*c)ans1++;
    else if(a == b || a == c || b == c)ans2++;
  }
  cout << ans1 << endl << ans2 <<endl;
  return 0;
}