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 <algorithm>
#include <vector>

using namespace std;

int main(void){
  int rectangle=0;
  int lozenge=0;
  int x,y,z;
  int i,n=0;
  pair<int, pair<int, int> > tri[100];
  bool isok = true;

  while(cin >> x){
	cin.ignore();
	cin >> y;
	cin.ignore();
	cin >> z;
	vector<int> edge;
	pair<int, int> tmp1;
	edge.push_back(x);
	edge.push_back(y);
	edge.push_back(z);
	
	sort(edge.begin(), edge.end());
	tmp1 = pair<int , int>(edge[1],edge[2]);
	
	for(i=0;i<n;i++){
	  if(tri[i] == pair<int, pair<int , int> >(edge[0], tmp1)){
		isok = false;
	  }
	}

	if(isok){
	  tri[n++] = pair<int, pair<int, int> >(edge[0], tmp1);
	  cerr << n << ":added" << edge[0] << " " << edge[1] << " " <<edge[2] << " " << endl;
	  if(edge[0] * edge[0] + edge[1] * edge[1] == edge[2] * edge[2]){
		rectangle++;
	  }else{
		lozenge++;
	  }
	}
	isok = true;
  }

  cout << rectangle << endl;
  cout << lozenge << endl;

  return 0;
}

C++: #include <iostream>
#include <vector>
#include <algorithm>
#include <map>
#include <string>
#include <stack>
#include <queue>
#include <cstdio>
#include <cmath>
#include <istream>
#include <sstream>
#include <iterator>

using namespace std;

typedef ostringstream OSS;
typedef istringstream ISS;

typedef pair<int,int> P_II;

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

int main() {
  int a[10000][3];
  int rect = 0, lozen = 0;
  map<string,bool> mp;
  OSS oss;
  
  for(int i = 0; scanf("%d,%d,%d", &a[i][0], &a[i][1], &a[i][2])!=EOF; i++) {
    sort(a[i], a[i]+3);
    oss << a[i][0] << "," << a[i][1] << "," << a[i][2];
    if(!mp[oss.str()]) {
      mp[oss.str()] = true;
      if(a[i][0]*a[i][0] + a[i][1]*a[i][1] == a[i][2]*a[i][2]) rect++;
      else if (a[i][0] == a[i][1]) lozen++;
    }
    oss.clear(); oss.str("");
  }
  cout << rect << endl << lozen << 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 == b ) {
      //      cout << "cnt2" << " " << a << "," << b << "," <<  c << endl;
      cnt2++;
    } else if ( a < c && b < c ) {
      //      cout <<"cnt1" << " "<<  a << "," << b << "," <<  c << endl;
      cnt1++;
    }
    
  }
  cout << cnt1 << endl << cnt2 << endl;
  return 0;
}

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

using namespace std;

int main() {

	int a, b, c, ob=0, dia=0;

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

	cout << ob << endl << dia << endl;

	return 0;

}

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

using namespace std;

int a[3];
int cnt[2];
int main(void){
	while(~scanf("%d,%d,%d",&a[0],&a[1],&a[2])){
		if(a[0]*a[0]+a[1]*a[1]==a[2]*a[2])cnt[0]++;
		if(a[0]==a[1])cnt[1]++;
	}
	printf("%d\n",cnt[0]);
	printf("%d\n",cnt[1]);
	return 0;
}

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

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

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

int a,b,c,tyo,hi;

int main(){
	while(cin>>a>>b>>c){
		if(c*c==a*a+b*b) tyo++;
		if(a==b) hi++;
	}
	cout<<tyo<<endl<<hi<<endl;

	return 0;
}

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

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

int main(){

  int cnt_s, cnt_r, b[3], a;
  string str;
  stringstream ss;

  cnt_s = 0;
  cnt_r = 0;
  while(getline(cin, str)){
    ss << str[0] << " " << str[2] << " " << str[4];
    ss >> b[0] >> b[1] >> b[2];

    if(b[0] * b[0] + b[1] * b[1] == b[2] * b[2]){
      cnt_s++;
    }
    else if(b[0] == b[1]){
      cnt_r++;
    }
    else
    ss.str("");
    ss.clear(stringstream::goodbit);
  }

  cout << cnt_s << endl << cnt_r << endl;

  return 0;

}

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

using namespace std;

int main(void){

  double l1,l2,taikaku;
  int cnt1 = 0;
  int cnt2 = 0;
  char ten;
  char tenten;

  while( cin >> l1 >> ten >> l2 >> tenten >> taikaku ){
    if( sqrt( pow( l1 , 2 ) + pow( l2 , 2 ) ) == taikaku ){
      cnt1++;
    }
    else if( l1 == l2 ){
      cnt2++;
    }
  }
  cout << cnt1 << endl << cnt2 << endl;
  return 0;
}

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

int main(){

  int a[5],count = 0,count2 = 0;

  while( scanf("%d,%d,%d",&a[0],&a[1],&a[2]) != EOF ){

    if(a[0] + a[1] >= a[2]){
      if(a[2] * a[2] == a[0] * a[0] + a[1] * a[1]) count++;
      else count2++;
    }

  }

  cout << count << endl << count2 << endl;
}

C++: #include<cstdio>

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 <iostream>
#include <cstdio>
#include <string>

using namespace std;

int main()
{
	int rectangle = 0;
	int rhombus   = 0;

	string line;
	while(getline(cin, line))
	{
		int a, b, c;
		sscanf(line.c_str(), "%d,%d,%d", &a, &b, &c);

		if(a * a + b * b == c * c)
			rectangle++;
		if(a == b)
			rhombus++;
	}

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

	return 0;
}

C++: #include<stdio.h>

int main(){

int x,y,z;
int N=0,W=0;
while(scanf("%d %d %d",&x,&y,&z)!=EOF){
if(x==y)N++;
else if(x!=y)W++;
}
printf("%d\n",N);printf("%d\n",W);

return 0;
}

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

int main(){
	int squ=0;
	int rho=0;
	int len1,len2,dia;
	while(scanf("%d",&len1)!=EOF){
		scanf(",%d,%d",&len2,&dia);
		if(len1==len2)rho++;
		if(hypot(len1,len2)==dia)squ++;
	}
	cout<<squ<<endl;
	cout<<rho<<endl;
	return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;
int main(){
	string s;
	int a[3],b=0,c=0;
	while(cin>>s){
		a[0]=s[0]-'0';
		a[1]=s[2]-'0';
		a[2]=s[4]-'0';
		sort(a,a+3);
		if(a[0]==a[1]&&a[1]!=a[2])b++;
		if(a[0]*a[0]+a[1]*a[1]==a[2]*a[2])c++;
	}
	cout<<b<<endl<<c<<endl;
}

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

int main(){
	int a[3],t,h;
	char d;
	t=h=0;
	while(cin>>a[0]!='\0'){
		cin>>d>>a[1]>>d>>a[2];
		if(a[0]*a[0]+a[1]*a[1]==a[2]*a[2])t++;
		else if(a[0]==a[1])h++;
	}
	cout<<t<<endl<<h<<endl;
}

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

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

C++: #include<bits/stdc++.h>
#define rep(i,n)for(ll i=0;i<n;i++)
using namespace std;
typedef long long ll;

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

C++: #include <cstdio>

using namespace std;

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