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++: // includes
#include <cstdio>
#include <cstdint>
#include <iostream>
#include <iomanip>
#include <string>
#include <queue>
#include <stack>
#include <vector>
#include <set>
#include <map>
#include <unordered_map>
#include <algorithm>
#include <utility>
#include <functional>
#include <cmath>
#include <climits>
#include <bitset>

// macros
#define ll long long int
#define pb push_back
#define mk make_pair
#define pq priority_queue
#define FOR(i, a, b) for(int i=(a); i<(b);++i)
#define rep(i, n) FOR(i, 0, n)

using namespace std;

//  types
typedef pair<int, int> P;
typedef pair<ll, int> Pl;
typedef pair<ll, ll> Pll;
 
// constants
const int inf = 1e9;
const ll linf = 1LL << 50;
const double EPS = 1e-10;

// solve

int main(int argc, char const* argv[])
{
  string s;
  int rec = 0, hi = 0;
  while(cin >> s){
    s += ",";
    vector<int> ed;
    string tmp = "";
    rep(i, s.size()){
      if(s[i] == ','){
        ed.pb(stoi(tmp));
        tmp = "";
      }else{
        tmp += s[i];
      }
    }
    if(ed[2] * ed[2] == ed[1] * ed[1] + ed[0] * ed[0]){
      rec++;
    }
    if(ed[0] == ed[1])hi++;
  }
  cout << rec << endl;
  cout << hi << endl;
	return 0;
}

C++: #include <cstdio>
#include <cstring>
#include <algorithm>
#include <string>
#include <cmath>
#include <stack>
#include <vector>
#include <map>
#include <set>
#include <iostream>


using namespace std;

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

	return 0;
}

C++: #include<cstdio>
#include<algorithm>
#include<vector>
#include<string>
#include<iostream>
#include<queue>
#include<map>
#include<set>
#include<complex>
#include<stack>
#include<cmath>

using namespace std;

#define reps(i,f,n) for(int i=f;i<int(n);i++)
#define rep(i,n) reps(i,0,n)


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

C++: #include <bits/stdc++.h>
#define rep(i, a, n) for(int i = a; i < n; i++)
#define repb(i, a, b) for(int i = a; i >= b; i--)
#define all(a) a.begin(), a.end()
#define o(a) cout << a << endl
// #define int long long
#define first first
#define second se
using namespace std;
typedef pair<int, int> P;
typedef vector<int> vi;

signed main(){
    int t = 0, h = 0;
    int a, b, c;
    while(1){
       if(scanf("%d,%d,%d", &a, &b, &c) == EOF) break;
        // cout << a << b << c << endl;
        if(a * a + b * b == c * c) t++;
        else if(a == b) h++;
    }
    o(t);
    o(h);
}

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

int main(){
	vector<int> num(3);
	set<string> rectangle, lozenge;
	while( ~scanf("%d,%d,%d", &num[0], &num[1], &num[2]) ){
		sort(num.begin(), num.end());
		string temp = "";
		for(int i=0; i<3; i++) temp += '0'+num[i];
		if( temp[0] == temp[1] || temp[1] == temp[2] ) lozenge.insert(temp);
		else rectangle.insert(temp);
	}
	cout << rectangle.size() << endl;
	cout << lozenge.size() << endl;
}

C++: #include<cstdio>
using namespace std;
int main(){
	int rec=0,dia=0;
	int a,b,c;
	while(scanf("%d,%d,%d",&a,&b,&c)!=EOF){
		if(a*a+b*b==c*c)rec++;
		else if(a==b)dia++;
	}
	printf("%d\n%d\n",rec,dia);
	return 0;
}

C++: #include <iostream>
#include <iomanip>
#include <vector>
#include <string>
#include <stack>
#include <set>
#include <cmath>
#include <algorithm>
using namespace std;

int main(){
	int s1 , s2 , diag;
	char c;
	int rect , rhom;
	rect=rhom=0;
	while(cin>>s1>>c>>s2>>c>>diag){
		if((s1*s1)+(s2*s2)==diag*diag && s1==s2){
			rect++; rhom++;
		} else if((s1*s1)+(s2*s2)==diag*diag) {
			rect++;
		} else if(s1==s2){
			rhom++;
		}
	}
	cout << rect << endl << rhom << endl;
	return 0; 
}

C++: 
#include <iostream>

using namespace std;

int main() {
    int l1, l2, l3;
    char c1, c2;
    int rect = 0, diamond = 0;

    while(cin >> l1 >> c1 >> l2 >> c2 >> l3) {
        if(l1*l1+l2*l2 == l3*l3) ++rect;
        if(l1 == l2) ++diamond;
    }
    cout << rect << endl;
    cout << diamond << endl;

    return 0;
}

C++: #include <iostream>
#include <stdio.h>

using namespace std;

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

	while(scanf("%d,%d,%d", &a , &b , &c) != EOF){

		//if(a == 0 && b == 0 && c == 0) break;
		if(a != b && a != c && b != c){
			ans1++;
		}
		if(a == b && a != c && c != b){
			ans2++;
		}
	}

	cout << ans2 << endl;
	cout << ans1 << endl;

	return 0;
}

C++: #include <cstdio>

int main(int argc, char *argv[]) {
	int e1, e2 ,dline, sum_rhom=0, sum_rect=0;
	while (EOF != fscanf(stdin, "%d,%d,%d", &e1, &e2, &dline)) {
		// if has 90-angle
		if (e1*e1+e2*e2 == dline*dline) {
			sum_rect++;
			continue;
		}
		// if rhombic
		if (e1 == e2) {
			sum_rhom++;
			continue;
		}
	}
	printf("%d\n", sum_rect);
	printf("%d\n", sum_rhom);
	return 0;
}

C++: #include<iostream>
#include<string>
#include<cstdio>
#include<algorithm>
#include<stack>
#include<queue>
#include<vector>
#include<cmath>
#include<utility>
#include<set>
#include<complex>
#include<map>
#define vi vector<int>
#define vvi vector<vector<int> >
#define ll long long int
#define vl vector<ll>
#define vvl vector<vector<ll>>
#define vb vector<bool>
#define vc vector<char>
#define vs vector<string>
#define ld long double
#define INF 1e9
#define EPS 0.0000000001
#define rep(i,n) for(int i=0;i<n;i++)
#define loop(i,s,n) for(int i=s;i<n;i++)
#define all(in) in.begin(), in.end()
#define MAX 9999999
using namespace std;
typedef pair<int, int> pii;
int main(){
    pii ans=pii(0,0);
    int a,b,c; char hoge;
    while(cin>>a>>hoge>>b>>hoge>>c){
        if(a==b)ans.second++;
        else if(c*c==a*a+b*b)ans.first++;
    }
    cout<<ans.first<<"\n"<<ans.second<<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 = cho + 1;
		}
		if(a==b){
			hi = hi + 1;
		}
	}
	cout << cho << endl;
	cout << hi << endl;
}

C++: #include <stdio.h>

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);

	return 0;
}

C++: #include <iostream>
#include <cstdio>
#include <string>
#include <algorithm>
#include <math.h>
#include <map>

//#define PI 3.141592653589

using namespace std;



int main()
{
	int hen1, hen2, taikaku;
	int tyouhoukei=0, hisigata=0;
	
	while (scanf("%d,%d,%d", &hen1, &hen2, &taikaku) != EOF)
	{
		if (taikaku*taikaku == hen1*hen1 + hen2*hen2) tyouhoukei++;
		if (hen1 == hen2) hisigata++;
	}
	cout << tyouhoukei << endl << hisigata << endl;
	
	return 0;
}

C++: #include <iostream>
#include <stdio.h>
#include <stdlib.h>

int main(){
  int a, b, c;
  int tyou = 0;
  int hishi = 0;
  
  while(scanf("%d,%d,%d\n", &a, &b, &c)!=EOF){
    if(a==b || a==c || b==c){
      if(a+b>c && b+c>a && c+a>b){
        hishi++;
      }
    }
      if(a>b){
        if(a>c){
          if(a*a==b*b+c*c) tyou++;
        }else{
          if(c*c==a*a+b*b) tyou++;
        }
      }else{
        if(b>c){
          if(b*b==a*a+c*c) tyou++;
        }else{
          if(c*c==a*a+b*b) tyou++;
        }
      }
    
  }
  
  std::cout << tyou << std::endl << hishi << std::endl;
  
  return 0;
}