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 <algorithm>
#include <vector>
#include <math.h>
#include <stdio.h>
#include <cctype>
#include <iostream>
#include <set>
#include <string>
#include <queue>
#include <map>
#include <utility>
using namespace std;
int size(string x){
	string::size_type size=x.size();
	return size;
}
#define fu(l,k) for(int i=l;i<k;i++)
#define fd(l,k) for(int i=l;i>k;i--)
#define sort(ss) sort(ss.begin(), ss.end())
#define rsort(ss) sort(ss.rbegin(), ss.rend())
typedef  vector<string> vs;
typedef  vector<int> vi;
double pi(){
	return M_PI;
}
typedef set<int> set_i;
typedef set<string> set_s;
int INF=1000000;
int main(){
	int a,b,ll;
	int ssr=0,sr=0;
	char qq;
	while(cin>>a>>qq>>b>>qq>>ll){
		if(a==b){
			ssr++;
		}
		else if(a*a+b*b==ll*ll){
			sr++;
		}
	}
	cout<<sr<<endl;
	cout<<ssr<<endl;
}

C++: #include <algorithm>
#include <cstdio>
#include <iostream>
#include <map>
#include <cmath>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
#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)==1){
        if(a*a+b*b==c*c) sq++;
        if(a==b) hishi++;
    }
    cout << sq << endl;
    cout << hishi << endl;
}

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

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

int main()
{
	int a,b,c;
	char d;
	int l=0,h=0;
	while(cin >> a >> d >> b >> d >> c){
		if(pow(a,2) + pow(b,2) == pow(c,2)){
			if(a == b)
				++h;
			else
				++l;
		}
	}
	
	cout << l << endl << h << endl;
	
	return 0;
}

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

int a,b,c,tyo,hi;

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

	return 0;
}

C++: #include <iostream>
#include <string>
using namespace std;
short int n[3];

void input(string s){
	int x=0,l=0;
	for (int i = 0; i < s.size(); i++) {
		if (s[i] != ',') {
			x = x * 10 + s[i] - '0';
			continue;
		}
		n[l++] = x;
		x = 0;
	}
	n[2] = x;
}


int main() {
	string s;
	short int cnt1 = 0, cnt2 = 0;
	while (cin >> s) {
		input(s);
		if (n[0]*n[0] + n[1] * n[1] == n[2] * n[2])
			cnt1++;
		if (n[0] == n[1])
			cnt2++;
	}
	cout << cnt1 << endl << cnt2 << endl;
	return 0;
}

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-6)) res1++;
		if (a == b) res2++;
	}
	cout << res1 << endl;
	cout << res2 << endl;
	return 0;
}

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

int pow(int a,int n){
	if(n <= 0){
		return 1;
	}
	return a * pow(a,n - 1);
}

int main(){
	int a,b,c;
	int ans1 = 0;
	int ans2 = 0;
	while(scanf("%d,%d,%d",&a,&b,&c) != EOF){
		if(pow(a,2) + pow(b,2) == pow(c,2)){
			ans1++;
		}
		if(a == b){
			ans2++;
		}
	}
		printf("%d\n%d\n",ans1,ans2);
	///////////////////////////////////
	//Sleep(200000);///////////////////// 提出するときは必ず外す！
	///////////////////////////////////
	return 0;

}

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

int max(int x, int y) {
  return (x > y) ? x : y;
}

int main() {
  int a, b, c;
  int r, l;

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

  return 0;
}

C++: #include <iostream>
#include <cstdio>

using namespace std;

int main(void){
  int d1,d2,d3;
  int count1=0,count2=0;

  while(scanf("%d,%d,%d",&d1,&d2,&d3)!=EOF){
    if(d1*d1+d2*d2==d3*d3&&d1!=d2)count1++;
    if(d1*d1+d2*d2!=d3*d3&&d1==d2)count2++;
  }

  cout<<count1<<endl;
  cout<<count2<<endl;

  return(0);
}

C++: #include <iostream>

using namespace std;

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

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


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

}

C++: #include <cstdio>

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

C++: #include<iostream>
#include<algorithm>

using namespace std;

int main(){

  int in[3];
  char trash;
  int sumt = 0, sumh = 0;

  while(cin >> in[0] >> trash >> in[1] >> trash >> in[2]){
    if(in[2] > in[0]+in[1]){

    }else{
      if(in[2]*in[2] == in[0]*in[0] + in[1]*in[1]) sumt++;
      if(in[0] == in[1] || in[1] == in[2]) sumh++;
    }
  }

  cout << sumt << endl << sumh << endl;

  return 0;

}

C++: #include<bits/stdc++.h>
using namespace std;
int main()
{
int co=0,co1=0,Rectangle=0,Rhombus=0;
double side[3];
char str[300];
while(cin>>str){
for(int i=0;i<3;i++)side[i]=0;
for(int i=0;i<=strlen(str);i++){
if(str[i]==','||str[i]=='\0'){
for(int j=co;j<i;j++)side[co1]+=(str[j]-'0')*pow(10,i-j-1);
co=i+1;
co1++;
}
}co=0;co1=0;
if(side[0]==side[1])Rhombus++;
else if(side[0]*side[0]+side[1]*side[1]==side[2]*side[2])Rectangle++;
}
cout<<Rectangle<<endl<<Rhombus<<endl;
}

C++: #include<iostream>
using namespace std;
int main(void)
{
int a,b,c;
while(cin>>a>>b>>c)
{
int x[3];
int count1=0,count2=0;
if(a*a+b*b==c*c)count1++;
else if(a==b)count2++;
cout<<count1<<endl;
cout<<count2<<endl;
}
return 0;
}

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

int main() {
	int sides[3]; int tyoho = 0, para = 0;
	while (scanf("%d,%d,%d", &sides[0], &sides[1], &sides[2]) != EOF) {
		//????????¢???check
		if (sides[0] * sides[0] + sides[1] * sides[1] == sides[2] * sides[2]) {
			tyoho++;
		}
		//??????????????¢???check
		else if (sides[0] == sides[1]) {
			para++;
		}
	}
	cout << tyoho << endl << para << endl;
}