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 <cstdio>
#include <cmath>
using namespace std;
int main(void) {
  int dia=0, rect=0;
  int side1, side2, diagonal;
  char c1, c2;

  while(cin >> side1 >> c1 >> side2 >> c2 >> diagonal) {
    if(diagonal * diagonal == side1*side1 + side2*side2) rect++;
    else if(side1 == side2 ) dia++;
  }
  cout << rect << endl << dia << endl;
  return 0;
}

C++: #include<cstdio>

int chou=0;
int hisi=0;

int date_1,date_2,date_3;

int main()
{
	while(scanf("%d,%d,%d",&date_1,&date_2,&date_3)!=EOF)
	{
		if(date_1*date_1+date_2*date_2==date_3*date_3)chou++;
		else if(date_1==date_2)hisi++;
	}
	printf("%d\n%d\n",chou,hisi);
	return 0;
}

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

int main(void)
{
	int a, b, c;
	char c1, c2;
	int tyocount = 0;
	int hishicount = 0;

	while(cin >> a >> c1 >> b >> c2 >> c)
	{
		if(a==b) hishicount++;
		if(a*a+b*b==c*c) tyocount++;
	}
	cout << tyocount << endl << hishicount << endl;
	return 0;
}

C++: #include <iostream>
#include <cmath>
#include <cstdlib>
#include <cstring>
#include <vector>

using namespace std;



int main(){
	int a, b, c;
	int m = 0, n = 0;

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

	return 0;
}

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

#define scanf scanf_s
#define printf printf_s

int a, b, c, r = 0, d = 0;

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

	return 0;
}

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

int main()
{
	int a, b, c = 0;
	int rect_num = 0;
	int diamond_num = 0;
	while (std::cin >> a >> b >> c)
	{
		int a2 = std::pow(a, 2);
		int b2 = std::pow(b, 2);
		int c2 = std::pow(c, 2);
		if ((a2 + b2) == c2)
		{
			rect_num++;
		}
		else
		{
			if (a == b)
			{
				diamond_num++;
			}
		}
	}
	std::cout << rect_num << std::endl;
	std::cout << diamond_num << std::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*a+b*b)==c*c) cnt1++;
    if(a==b) cnt2++;
  }
  cout << cnt1<<endl;
  cout << cnt2<<endl;
  return 0;
}

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 <cstdio>
using namespace std;

int main ()
{
    int a, b, c;
    int sq = 0, dy = 0;

    while (scanf("%d,%d,%d", &a, &b, &c) != EOF) {
        if (a == b && a*a + b*b == c*c) {
        } else if (a != b && a*a + b*b == c*c) {
            sq++;
        } else if (a != b && a*a + b*b != c*c) {
        } else {
            dy++;
        }
    }
    cout << sq << endl << dy << endl;

    return 0;
}

C++: #include <cstdio>

using namespace std;

int main()
{
        int a, b, c;
        int rct = 0, rhm = 0;

        while (scanf("%d%*c%d%*c%d", &a, &b, &c) != EOF) {
                if (a * a + b * b == c * c) {
                        rct++;
                }
                else if (a == b) {
                        rhm++;
                }
        }

        printf("%d\n%d\n", rct, rhm);

        return 0;
}

C++: #include <iostream>
using namespace std;
int main(){
int a;
int b;
int c;
char d;
int e;
int f;
e=0;
f=0;
while(cin >>a>>d>>b>>d>>c){
if(a*a+b*b==c*c){e=e+1;}
if(a==b){f=f+1;}
}
cout <<e<<endl<<f<<endl;}

C++: #include <iostream>
using namespace std;
int main( void )
{
	int t = 0;
	int h = 0;
	while ( !cin.eof() )
	{
		int a, b, c;
		char d, e;
		cin >> a >> d >> b >> e >> c;
		if ( cin.eof() )
			break;

		if ( a * a + b * b == c * c )
			t++;
		else if ( a == b )
			h++;
	}

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

C++: #include <iostream>
#include <algorithm>
#include <vector>
#include <cstdio>
#include <string>
#include <set>
#include <map>
#include <queue>
#include <stack>
#include <cmath>
#include <functional>
#include <numeric>
#include <iomanip>
#define fi first
#define se second
#define fcout(n) cout<<fixed<<setprecision((n))
#define cinl(str) getline(cin,(str))
using namespace std;
bool value(int y,int x,int R,int C){return 0<=y&&y<R&&0<=x&&x<C;}
typedef pair<int,int> pii;
typedef long long ll;
typedef vector<int> vi;
typedef vector<long long > vll;
typedef vector< vi > vvi;
double pie=acos(-1);
int INF=10000009;
int dx[4] = { 0,-1,0,1 };
int dy[4] = { -1,0,1,0 };
int main() {
	int a,b,c;
	char s,t;
	int count1=0,count2=0;
	while(true){
		cin>>a>>s>>b>>t>>c;
		if (cin.eof())break;
		if(c*c==a*a+b*b) count1++;
		if(a==b) count2++;
	}
	cout<<count1<<endl;
	cout<<count2<<endl; 
}

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

using namespace std;

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

C++: #include<iostream>
#include <stdio.h>
#include <vector>
using namespace std;
int loect=0,hisi=0;
int main(){int a1,a2,aa;char b1,b2;
while(cin>>a1>>b1>>a2>>b2>>aa){
	if(a1==a2){hisi++;}
	if(aa*aa==a1*a1+a2*a2){loect++;}}
cout<<loect<<endl<<hisi<<endl;
	return 0;}

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++;
    }else if(in[0] == in[1] || in[1] == in[2]){
      sumh++;
    }
  }

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

  return 0;

}

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

int main(){
int a,b,c,x=0,y=0;
While(scanf("%d,%d,%d",&a,&b,&c)!=EOF){
if(a==b)x++;
if(a*a+b*b==c*c)y++;
}
printf("%d?\n%d?\n",y,x);
return 0;
}

C++: #include <stdio.h>
int main(){
int a,b,c,ans=0,t=0;
while(scanf("%d,%d,%d",&a,&b,&c)!=EOF){
if(a*a+b*b==c*c)ans++;
if(a==b)t++;
}
printf("%d\n%d\n",ans,t);
}

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

int main(void){
int a,b,c;
int ca=0,cb=0;
char ch;

while(cin>>a>>ch>>b>>ch>>c){
if(a*a+b*b==c*c) ca++;
else if(a==b) cb++;
}
cout<<ca<<endl;
cout<<cb<<endl;
return 0;
}

C++: #include <iostream>
using namespace std;
int main(void){
    // Your code here!
    int a, b; //隣り合う辺の長さ
    int c;　　//対角線の長さ
    int rectangular = 0, rhombus = 0; //長方形と菱形の個数
    
    while(cin.fail()){
        cin >> a >> b >> c;
        if(a != b && a + b >= c && a * a + b * b == c * c) rectangular++;
        else if(a == b && a + b >= c) rhombus++;
    }
    cout << rectangular << endl;
    cout << rhombus << endl;
}

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

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

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

int main()
{
    int a, b, c;
    char p;

    int x = 0, y = 0;

    while( cin >> a >> p >> b >> p >> c )
    {
        if( a * a + b * b == c * c )
            x++;
        if( a == b )
            y++;
    }

    cout << x << endl << y << endl;

    return 0;
}

C++: #include<iostream>
#include<cstdio>
using namespace std;
main()
{
	int a,b,c,s=0,t=0;
	while(~scanf("%d,%d,%d",&a,&b,&c))
	{
		if(a*a+b*b==c*c)s++;
		if(a==b)t++;
	}
	cout<<s<<endl<<t<<endl;
}