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 <string>
#include <algorithm>
#include <utility>
#include <stack>
#include <functional>
#include <queue>
#include <cmath>

#define rep(i,j,k) for(int i=j;i<k;i++)
#define drep(n,m) for(int i=0;i<n;i++)for(int j=0;j<m;j++)
#define Sort(x) sort((x).begin(),(x).end())
#define fi first
#define se second
#define vi vector<int>
#define INF 1000000000
#define MOD 1000000009
#define pb push_back
#define mp make_pair
typedef long long ll;
int dx[4]={0,1,0,-1},dy[4]={1,0,-1,0};

using namespace std;

ll gcd(ll a,ll b){
    if(a<b){
        int t=a;a=b;b=t;
    }
    int c=a%b;
    while(c!=0){
        a=b;
        b=c;
        c=a%b;
    }
    return b;
}

ll lcm(ll a,ll b){
    return a*b/gcd(a,b);
}

bool isPrime(int x){
    if(x==1)return false;
    if(x==2)return true;
    if(x%2==0)return false;
    for(int i=3;i<=sqrt(x);i+=2){
        if(x%i==0)return false;
    }
    return true;
}

int kaizyo(int x){
    if(x==1)return x;
    else return x*kaizyo(x-1);
}


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

C++: #include <stdio.h>

int main(void){
    int a,b,di;
    int rect=0, rhom=0;
    
    while (scanf("%d,%d,%d", &a,&b,&di) != EOF){
        if (a*a+b*b == di*di) rect++;
        if (a==b) rhom++;
    }
    printf("%d\n%d\n", rect,rhom);

    return 0;
}

C++: #include <stdio.h>

int w1, w2, w3;

int is_rect(void){
	return w3*w3 == w1*w1 + w2*w2;
}

int is_hishi(void){
	return w1 == w2;
}

int main(void){
	int cr = 0, ch = 0;
	while(scanf("%d,%d,%d", &w1, &w2, &w3) != EOF){
		cr += is_rect();
		ch += is_hishi();
	}
	printf("%d\n%d\n", cr, ch);
	return 0;
}

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

using namespace std;

int main()
{
    int a, b, c, d = 0, e = 0;
    char ch;
    while (cin >> a >> ch >> b >> ch >> c) {
        if (pow(a, 2) + pow(b, 2) == pow(c, 2)) {
            d++;
        }
        if (a == b) e++;
    }
    cout << d << "\n" << e << endl;
    return 0;
}

C++: #include <iostream>
#include <string>
#include <map>
#include <vector>
#include <algorithm>
#include <stdio.h>
#include <math.h>
#define p(n) pow(n,2)
using namespace std;
int main(){
  int a,b,c,rhom=0,rect=0;
  while(scanf("%d,%d,%d",&a,&b,&c)!=EOF){
    if(p(a)+p(b)==p(c))rect++;
       if(a==b)rhom++;
  }
cout<<rect<<endl<<rhom<<endl;
  return 0;
}

C++: #include <cstdio>

using namespace std;

int main()
{
  int x, y, r, hisi = 0, tyou = 0;
  while (scanf("%d,%d,%d ", &x, &y, &r) == 3) {
    if (x == y) {hisi++;}
    if (x * x + y * y == r * r) {tyou++;}
  }
  
  printf("%d\n%d\n", hisi, tyou);
}

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

int main(){
	int edge1, edge2, diag, courec = 0, couloz = 0;
	while(scanf("%d,%d,%d", &edge1, &edge2, &diag) != EOF){
		if(edge1 == EOF || edge2 == EOF || diag == EOF) break;
		int edge11 = edge1 * edge1, edge22 = edge2 * edge2, diagg = diag * diag;
		if(edge11 + edge22 == diagg) courec++;
		else if(!(edge1 == edge2 && edge2 == diag && edge1 == diag)) couloz++;
	}
	cout <<courec <<endl <<couloz <<endl;
	return 0;
}

C++: #include <iostream>
using namespace std;
int main() {
    int a, b, c;
    int c1 = 0, c2 = 0;
    char d;
    while (cin >> a >> d >> b >> d >> c) {
        if (a * a + b * b == c * c) {
            c1 ++;
        }
        if (a == b) {
            c2 ++;
        }
    }
    cout << c1 << "\n";
    cout << c2 << "\n";
    return 0;
}

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

int main()
{
	int rectnum = 0;
	int lozenum = 0;
	while(true)
	{
	int a,b,c;
	cin >> a;
	if(cin.eof())break;
	fgetc(stdin);
	cin >> b;
	fgetc(stdin);
	cin >> c;
	if((a*a+b*b)==c*c)rectnum++;
	if(a==b)lozenum++;
	}
	cout << rectnum << endl;
	cout << lozenum << 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(scanf("%d,%d,%d", &a, &b, &c) != EOF){
        if(a * a + b * b == c * c) rectangular++;
        else if(a == b) rhombus++;
    }
    cout << rectangular << endl;
    cout << rhombus << endl;
}

C++: #include <iostream>

using namespace std;

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

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


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

	return 0;
}

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

using namespace std;

#define LOG(...) printf(__VA_ARGS__)
//#define LOG(...)
#define FOR(i,a,b) for(int i=(int)(a);i<(int)(b);++i)
#define REP(i,n) for(int i=0;i<(int)(n);++i)
#define ALL(a) (a).begin(),(a).end()
#define RALL(a) (a).rbegin(),(a).rend()
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define SORT(c) sort((c).begin(),(c).end())
#define RSORT(c) sort((c).rbegin(),(c).rend())
#define CLR(a) memset((a), 0 ,sizeof(a))

typedef long long ll;
typedef unsigned long long ull;
typedef vector<bool> vb;
typedef vector<int> vi;
typedef vector<ll> vll;
typedef vector<vb> vvb;
typedef vector<vi> vvi;
typedef vector<vll> vvll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;

const int dx[] = { -1, 0, 1, 0 }; const int dy[] = { 0, 1, 0, -1 };

int main() {
string s;
int side1,side2,dia;
int rect=0,hisi=0;
while (scanf("%d,%d,%d", &side1, &side2, &dia)!=EOF){
	if (side1*side1+side2*side2==dia*dia)
	rect++;
	if (side1==side2)
	hisi++;
	}
	cout<<rect<<endl;
	cout << hisi << endl;
	return 0;
}

C++: #include <iostream>
#include <cstdio>
using namespace std;
int main()
{
    string s;
    int x = 0, y = 0;
    while (cin >> s) {
        int a, b, c;
        sscanf(s.c_str(), "%d,%d,%d", &a, &b, &c);
        if (a == b) y++;
        if (a * a + b * b == c * c) x++;
    }
    cout << x << "\n" << y << 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++: #include <iostream>
#include <algorithm>
using namespace std;
int main(void){
	int a[3],ans[2];
	char com;
	ans[0]=0;ans[1]=0;
	while(cin>>a[0]>>com>>a[1]>>com>>a[2]){
		if(a[2]*a[2]==a[0]*a[0]+a[1]*a[1])ans[0]++;
		if(a[0]==a[1])ans[1]++;
	}
	cout<<ans[0]<<endl<<ans[1]<<endl;
	return 0;

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

int main(){
	int a, b, c, x = 0, y = 0;
	char cc;
	while(cin >>a>>cc>>b>>cc>>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 a, b, c, n = 0, m = 0;
	char t;
	while (1)
	{
		cin >> a;
		if (cin.eof()) break;
		cin >> t >> b >> t >> c;
		if (a*a + b*b == c*c) n++;
		if (a == b) m++;
	}
	cout << n << endl << m << endl;
}