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 <bits/stdc++.h>
using namespace std;

#define iota(i,n,b,s) for(int i=int(b);i!=int((b)+(s)*(n));i+=(s))
#define range(i,n,m) iota(i,(((n)>(m))?((n)-(m)):((m)-(n))),(n),((n)>(m)?-1:1))
#define rep(i,n) iota(i,(n),0,1)
#define loop for(;;)

#define INF (1e9)
#define EPS (1e-9)
#define cons(a,b) (make_pair(a,b))
#define car(a) (a.first)
#define cdr(a) (a.second)
#define cadr(a) (car(cdr(a)))
#define cddr(a) (cdr(cdr(a)))
#define all(a) a.begin(), a.end()
#define trace(var) cerr<<">>> "<<#var<<" = "<<var<<endl;

typedef long long Integer;
typedef double Real;
typedef vector<int> vi;
typedef vector<string> vs;
typedef map<string,int> Dictionary;
const Real PI = acos(-1);

template<class S, class T>
ostream& operator<<(ostream& os, pair<S,T> p) {
  os << '(' << car(p) << ", " << cdr(p) << ')';
  return os;
}

template<class T>
ostream& operator<<(ostream& os, vector<T> v) {
  if (v.size() == 0) {
    os << "(empty)";
    return os;
  }
  os << v[0];
  for (int i=1, len=v.size(); i<len; ++i) os << ' ' << v[i];
  return os;
}

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

int main() {

  int a,b,c;
  char comma;

  int cx = 0;
  int cy = 0;

  loop {
    cin >> a >> comma >> b >> comma >> c;
    if (!cin) break;
    if (a * a + b * b == c * c) ++cx;
    if (a == b) ++cy;
  }
  cout << cx << endl;
  cout << cy << endl;

  return 0;
}

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

#define all(c) (c).begin(), (c).end()
#define rep(i,n) for(int i=0;i<(n);i++)
#define pb(e) push_back(e)
#define mp(a, b) make_pair(a, b)
#define fr first
#define sc second

const int INF=100000000;
int dx[4]={1,0,-1,0};
int dy[4]={0,1,0,-1};
using namespace std;
typedef pair<int ,int > P;
typedef long long ll;

int main() {
    int a[3];
    int cnt1=0,cnt2=0;
    while(~scanf("%d,%d,%d",&a[0],&a[1],&a[2])) {
        sort(a,a+3);
        if(a[2]*a[2]==a[0]*a[0]+a[1]*a[1]) cnt1++;
        if(a[0] == a[1] && a[0] < a[2]) cnt2++;
    }
    cout<<cnt1<<endl;
    cout<<cnt2<<endl;
    return 0;
}

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

#define REP(i,n) for(int i=0; i<n; i++)

int main()
{
  int a[3];
  char del;

  int rect=0, loz=0;
  while(cin >> a[0] >> del >> a[1] >> del >> a[2]){
    if( abs(a[0]-a[1]) < a[2] && a[2] < a[0]+a[1] ){
      if(!( a[0] == a[1] && a[1] == a[2])){

	if( a[2]*a[2] == a[1]*a[1] + a[0]*a[0])
	  rect++;
	else
	  loz++;
      }
    }
  }
  cout << rect << endl;
  cout << loz << endl;
  return 0;
}

C++: #include<bits/stdc++.h>
using namespace std;
int a,b,c,ans,ans2;

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

C++: #include<iostream>
using namespace std;
int main(){
  int s[3],hi=0,tyo=0;
  char c[2];
  while(cin>>s[0]>>c[0]>>s[1]>>c[1]>>s[2]){
    if(s[0]!=s[1]&&s[2]*s[2]==s[0]*s[0]+s[1]*s[1]) tyo++;
    else if(s[0]==s[1]) hi++;
  }
  cout << tyo << endl << hi << endl;
  return 0;
}

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

int main()
{
	int t=0, h=0;
	set<vector<int> > T, H;
	int a, b, c;
	string buf;
	while(cin>>buf){
		if(buf=="0") break;
		sscanf(buf.c_str(),"%d,%d,%d", &a, &b, &c);
		vector<int> all;
		all.push_back(a);
		all.push_back(b);
		all.push_back(c);
		sort(all.begin(), all.end());
		if(all[0]==all[1] || all[1]==all[2]); H.insert(all)
		if(all[0]*all[0]+all[1]*all[1]==all[2]*all[2]) T.insert(all);
	}
	cout<<T.size()<<endl<<H.size()<<endl;
	return 0;
}

C++: #include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <functional>
#include <numeric>
#include <stack>
#include <map>
using namespace std;

#define FOR(i,a,b) for(long long int i=(a);i<(b);i++)
#define REP(i,n) for(long long int i=0;i<(n);i++)
#define ALL(s) (s).begin(),(s).end()

#define PI 3.14159265358479

typedef long long ll;

int t = 0, h = 0, l1, l2, l3;

int main(){
	while (scanf("%d,%d,%d", &l1, &l2, &l3)!=EOF){
		if (pow(l3, 2) == pow(l1, 2) + pow(l2, 2)){
			t++;
		}
		if (l1 == l2 || l2 == l3 || l3 == l1){
			h++;
		}
	}
	cout << t << "\n" << h << "\n";
}

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

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

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

int main(){
  string str;
  int a[3];
  int rect=0,hisi=0;
  while(cin>>str){
    stringstream ss(str);
    string buf;
    int i=0;
    while(getline(ss,buf,',')){
      a[i]= (buf[0]-'0');
      i++;
    }
    if(a[0]*a[0]+a[1]*a[1]==a[2]*a[2]) rect++;
    else if(a[0]==a[1]) hisi++;
  }

  cout << rect << endl << hisi << endl;

}

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

int main(){
	double side1, side2, diagonal, rectangle, rhombus;
	char x, y;
	while(cin >> side1 >> x >> side2 >> y >> diagonal){
		if(pow(side1, 2.0) + pow(side2, 2.0) == pow(diagonal, 2.0) && side1 != side2){
			rectangle++;
		}
		else if(pow(side1, 2.0) + pow(side2, 2.0) != pow(diagonal, 2.0) && side1 == side2){
			rhombus++;
		}
	}

	cout << rectangle << endl << rhombus << endl;
}

C++:  
 #include<iostream>
 #include<stdio.h>
 #include<string>
 #include<math.h>
 #include<iomanip>
 #include<algorithm>
 #include<string.h>
 #include<cctype>
 #include<map>
 #include<set>
 #include<vector>
 #include<sstream>
 #include<stack>
 #include<queue>
 
 using namespace std;
  
 int main()
 {
   int a,b,c;
   int arr[100005][3];
   int count1=0;
   int count2=0;
   int count=0;
   char temp,temp1;
   bool flag;
   while(cin>>a>>temp>>b>>temp1>>c)
   {
     flag=false;
     arr[count][0]=a;
     arr[count][1]=b;
     arr[count][2]=c;
     sort(arr[count],arr[count]+3);
     count++;
       for(int i=0;i<count;i++)
       {
         if(a==arr[i][0]&&b==arr[i][1]&&c==arr[i][2])
         {
           flag=true;
           break;                                            
         }        
       }             
       if(!flag) 
       {
         if(a*a+b*b==c*c) count1++;
         else count2++;          
       } 
     cout<<count1<<endl;
     cout<<count2<<endl;                                  
   }
   //while(1);     
   return 0;  
 }

C++: #include<bits/stdc++.h>
using namespace std;
int a, b, c;
int ansa, ansb;
int main() {
	while (scanf("%d,%d,%d", &a, &b, &c) != EOF) {

		if (pow(c, 2) == (pow(a, 2) + pow(b, 2))) {
			ansa++;
		} else if (a == b) {
			ansb++;
		}
	}
	cout << ansa << endl;
	cout << ansb << endl;
}

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


int main(){
	int t=0,h=0;
	
	int x,y,z;
	while(scanf("%d,%d,%d",&x,&y,&z)!=EOF){
		if(x*x+y*y==z*z){
			t++;
		}
		if(x==y){
			h++;
		}
	}
	cout<<t<<endl<<h<<endl;
	
	return 0;
}