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++: // clang-format off
#include <bits/stdc++.h>
#define int long long
#define main signed main()
// #define main int main()
#define loop(i, a, n) for (int i = (a); i < (n); i++)
#define rep(i, n) loop(i, 0, n)
#define all(v) (v).begin(), (v).end()
#define rall(v) (v).rbegin(), (v).rend()
#define prec(n) fixed << setprecision(n)
#define stlice(from, to) substr(from, (to) - (from) + 1)
#define pb push_back
#define mp make_pair
#define mt make_tuple
#define fi first
#define se second
using namespace std;
using pii = pair<int, int>;
using vi = vector<int>;
using vd = vector<double>;
using vc = vector<char>;
using vb = vector<bool>;
using vs = vector<string>;
using vpii = vector<pii>;
using vvi = vector<vi>;
using vvb = vector<vb>;
using vvpii = vector<vpii>;
template<typename A> using fn = function<A>;
constexpr int INF = sizeof(int) == sizeof(long long) ? 1000000000000000000LL : 1000000000;
constexpr int MOD = 1000000007;
constexpr double PI = acos(-1);
template<typename A, typename B> bool cmin(A &a, const B &b) { return a > b ? (a = b, true) : false; }
template<typename A, typename B> bool cmax(A &a, const B &b) { return a < b ? (a = b, true) : false; }
constexpr bool odd(const int &n) { return n & 1; }
constexpr bool even(const int &n) { return !odd(n); }
template<typename V> constexpr typename V::value_type sum(const V &v) { return accumulate(all(v), 0); }
void solve();
main { solve(); return 0; }
// clang-format on

void solve() {
	int a, b, c;
	char gomi;
	int x = 0, y = 0;
	while (cin >> a >> gomi >> b >> gomi >> c) {
		x += a * a + b * b == c * c;
		y += a == b;
	}
	cout << x << endl << y << endl;
}

C++: #include <iostream>

using namespace std;

int main(){
	int a, b, c;
	char d;
	int cho=0;
	int hi=0;

	while(cin >> a >> d >> b >> d >> c){


		if(a*a + b*b == c*c){
			cho++;
		}
		else if(a == b){
			hi++;
		}
	}
	cout << cho << endl << hi << endl;

}

C++: #include<iostream>
#include<iomanip>
#include<string>
#include<algorithm>
#include<cmath>
using namespace std;
int main(){
    int a,b,c,x=0,y=0;
    char g,m;
    while(cin>>a>>g>>b>>m>>c){
        if(c*c==a*a+b*b){
            x++;
        }else if(a==b){
            y++;
        }
    }
    cout<<x<<endl<<y<<endl;
    return 0;
}

C++: #include <iostream>
using namespace std;
int main(){
	int a, b, c, x = 0, y = 0;
	char t;
	while(cin >> a >> t >> b >> t >> c){
		if(a*a + b*b == c*c) x++;
		if(a == b) y++;
	}
	cout << x << endl << y << endl;
	return 0;
}

C++: #include<iostream>
using namespace std;
int main(){
int i,j,k,r=0,d=0;
char c;
while(cin>>i){
cin>>c>>j>>c>>k;
if(i*i+j*j==k*k)r++;
if(i==j)d++;
}
cout<<r<<endl;
cout<<d<<endl;
return 0;
}

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

#define REP(i,n) for(int i=0;i<(int)n;++i)
#define FOR(i,c) for(__typeof((c).begin())i=(c).begin();i!=(c).end();++i)
#define ALL(c) (c).begin(), (c).end()

int main() {
  int a,b,c;
  int h=0, t=0;
  while(scanf("%d,%d,%d",&a,&b,&c)==3) {
    if (a==b) h++;
    if (a*a+b*b==c*c) t++;
  }
  printf("%d\n%d\n",t,h);
}

C++: #include<iostream>
using namespace std;
int main(){
  int t,y,n;
  char c;
  int ty=0,h=0;
  while(cin>>t>>c>>y>>c>>n){
    if(t*t+y*y==n*n)ty++;
    if(t==y)h++;
  }
  cout<<ty<<"\n"<<h<<endl;
  return 0;
}

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

int main()
{
	int a, b, c;
	char d;
	int t=0, h=0;

	while (cin >> a >> d >> b >> d >> c){
		if (c*c == (a*a + b*b))
			t++;
		if (a == b)
			h++;
	}

	cout << t << endl << h << endl;
	return 0;
}

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

int main()
{
	int a,b,c;
	char d;
	int l=0,h=0;

	while(scanf("%d,%d,%d",&a,&b,&c) != EOF){
		if(a*a + b*b == c*c){
			++l;
			if(a == b)
				++h;
		}
	}
	
	cout << l << endl << h << endl;
	
	return 0;
}

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

int main() {
  int a,b,c;
  int cnt1 = 0,cnt2 = 0;
  while ( scanf("%d,%d,%d",&a,&b,&c) != EOF ) {
    if ( a != b && b!= c && c != a ) {
      //      cout <<"cnt1" << " "<<  a << "," << b << "," <<  c << endl;
      cnt1++;
    }
    else if ( a == b && a != c ) {
      //      cout << "cnt2" << " " << a << "," << b << "," <<  c << endl;
      cnt2++;
    }
  }
  cout << cnt2 << endl << cnt1 << endl;
  return 0;
}

C++: #include <iostream>

using namespace std;

bool Rectangle(int a, int b, int c)
{
	return a * a + b * b == c * c;
}

bool Diamond(int a, int b, int c)
{
	return a == b || b == c;
}

int main()
{
	int a, b, c, sum1 = 0, sum2 = 0; char ch;

	while (cin >> a >> ch >> b >> ch >> c)
	{
		if (Rectangle(a, b, c)) sum1++;

		if (Diamond(a, b, c)) sum2++;
	}

	cout << sum1 << endl << sum2 << endl;

	return 0;
}

C++: #include<functional>
#include<algorithm>
#include<iostream>
#include<utility>
#include<string>
#include<vector>
#include<cmath>
#include<stack>
#include<queue>
#include<deque>
#include<map>
#define REP(i,n) for(int i=0;i<n;i++)
#define LOOP(i,x,n) for(int i=x;i<n;i++)
#define ALL(v) (v).begin(),(v).end()
#define pf push_front
#define pb push_back
#define int long long
using namespace std;
const int INF=1000000007;
int dx[4]={1,0,-1,0};
int dy[4]={0,1,0,-1};

signed main(){
  int a,b,c;
  char k;
  int ans1=0,ans2=0;
  while(cin>>a>>k>>b>>k>>c){
    if((a*a+b*b)==c*c)ans1++;
    else if(a==b)ans2++;
  }
  cout<<ans1<<endl;
  cout<<ans2<<endl;
  
  return 0;
}

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

int main(void){
    string s;
    char q;
    int a,b,c,d=0,e=0;
    while(cin>>a>>q>>b>>q>>c){
        if(a==b) d++;
        if(a*a+b*b==c*c) e++;
        
    }
    cout<<e<<endl<<d<<endl;
}

C++: #include<iostream>
using namespace std;
int main(){
	int a, b, c, rect = 0,rhom = 0;
	while(cin >> a >> b >>c){
		if(a * a + b * b == c * c) rect++;
		else if(a == b) rhom++;
	}
	cout << rect << "?\n" << rhom << endl;
}

C++: #include <iostream>
#include <string>
#include <cstdlib>

using namespace std;

int main(){
  string d1,d2,d3;
  int a1,a2,a3;
  int c1,c2;
  while(getline(cin,d1,',')){
    a1 = atoi(d1.c_str());
    getline(cin,d2,',');
    a2 = atoi(d2.c_str());
    getline(cin,d3,'\n');
    a3 = atoi(d3.c_str());
    if (a1*a1+a2*a2==a3*a3)c1++;
    if (a1==a2)c2++;
  }
  cout <<c1<<endl<<c2<<endl;
  return 0;
}

C++: #include<iostream>
using namespace std;
int main(){
  int l1,l2,l3,ans1,ans2;
  char a;
  ans1 = 0; ans2 = 0;
  while(cin >> l1 >>a >>l2 >>a>>l3){
    if(l1 == l2)
      ans2++;
    if(l1*l1 + l2*l2 == l3*l3)
      ans1++;
  }
  cout << ans1 << endl << ans2 << endl;
}

C++: #include <iostream>
using namespace std;
int main(){
	char e,f;
	int a,b,c;
	int t=0,h=0;
	while(cin>>a>>e>>b>>f>>c){
		if(a==b){
			h++;
		}
		if(a!=b){
			t++;
		}
		else if(a==b && (a*a)+(b*b)==(c*c)){
			t++;
		}
	}
	cout<<t<<endl;
	cout<<h<<endl;
	return 0;
}