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

#define MAX 10	// ªºÌ

int main()
{
	int x, y, d;
	int oblong = 0, rhombi = 0;

	while (scanf("%d,%d,%d", &x, &y, &d) != EOF) {
		if (x*x + y*y == d*d) oblong++;
		if (x == y) rhombi++;
	}
	cout<<oblong<<endl;
	cout<<rhombi<<endl;

	return 0;
}

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

int main(){

  int a,b,c;
  int sum1=0,sum2=0;
  while(scanf("%d,%d,%d",&a,&b,&c)!=EOF){
    if(a*a+b*b==c*c)sum1++;
    else  if(a==b)sum2++;
  }

  cout << sum1 << endl << sum2 << endl;

  return 0;
}

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

int main(){
    int a,b,c;
    int x=0,y=0;
    while(scanf("%d,%d,%d",&a,&b,&c)!=EOF){
        if(a*a+b*b==c*c)x++;
        if(a==b)y++;
    }

    printf("%d\n%d\n",x,y);
    
    return 0;
}

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

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

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

using namespace std;

int main(){
    int hi= 0,tyou = 0;
  int a,b,c;
  while(~scanf("%d,%d,%d",&a,&b,&c)){

    a = pow(a,2);
    b = pow(b,2);
    c = pow(c,2);
    if(c == a+b)tyou++;
    if(a == b)hi++;
}
  cout << tyou << endl<< hi << endl;
  return 0;
}

C++: #include <stdio.h>
int main (void)
{
	int a,b,c,hisi=0,tyou=0,i;
	while(scanf("%d,%d,%d",&a,&b,&c)!=EOF){
		if((c*c)==(a*a)+(b*b)){
			tyou++;
		}
		if(a==b){
			if(a*a-(c/2)*(c/2) > 0){
				hisi++;
			}
		}

	}
	printf("%d\n%d",tyou,hisi);
	return 0;
}

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[10000];
  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;
	edge.clear();
  }

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

  return 0;
}

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

int main(){

  int a,b,c,count = 0,count2 = 0;
  char x,y;

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

    if(c*c == a*a + b*b) count++;
    else if(a == b) count2++;

  }

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

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){
			h++;
		}
	}
	cout << t << "\n" << h << "\n";
}

C++: #include <iostream>

using namespace std;

void solve()
{
	int rect = 0;
	int diamond = 0;
	int a, b, c;
	while(~scanf("%d,%d,%d", &a, &b, &c))
	{
		if(a * a + b * b == c * c)
		{
			++rect;
		}
		else
		{
			++diamond;
		}
	}
	cout << rect << endl;
	cout << diamond << endl;
}

int main()
{
	solve();
	return(0);
}

C++: #include <iostream>

using namespace std;

int main()
{
	int a, b, c, ty = 0, hi = 0;
	char d;

	while(cin >> a >> d >> b >> d >> c){
		if((a*a + b*b) == c*c)
			ty++;
		if(a == b)
			hi++;
	}

	cout << ty << endl << hi << endl;

	return 0;
}

C++: #include<iostream>
using namespace std;
int main(){
    int n1 = 0 ,n2 = 0;
    int a , b , c ;
    char d;
    while(cin >> a >> d >> b >> d >> c){
        if(a*a + b*b == c*c){
            n1 ++ ;
        }
        else if(a == b){
            n2 ++ ;
        }
    }
    cout << n1 << endl << n2 << endl;
    return 0;
}

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 <iostream>
#include <cstdio>
#include <vector>
#include <algorithm>
#include <string>
using namespace std;

int main()
{
	int t=0, h=0;
	int a, b, c;
	string buf;
	while(cin>>buf){
		sscanf(buf.c_str(),"%d,%d,%d", &a, &b, &c);
		cout<<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]) h++;
		else if(all[1]==all[2]) h++;
		if(all[0]*all[0]+all[1]*all[1]==all[2]*all[2]) t++;
	}
	cout<<t<<endl<<h<<endl;
	return 0;
}

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

int main(){
    int a,b,c,h,t;
    h=0;
    t=0;
    while(scanf("%d,%d,%d",&a,&b,&c) != EOF){
        if(a == b) h++;
        else if(a*a + b*b == c*c) t++;
    }
    cout << t << endl << h << 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[2] < b[0] + b[1]){
      if(b[0] * b[0] + b[1] * b[1] == b[2] * b[2]){
        cnt_s++;
      }
      else if(b[0] == b[1]){
        cnt_r++;
      }

      ss.str("");
      ss.clear(stringstream::goodbit);
    }
  }

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

  return 0;

}

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

int main() {
  int a,b,c;
  int rec = 0,hy = 0;
  while(~scanf("%d", &a)) {
    scanf(",%d,%d", &b, &c);
    if(a == b) hy++;
    if(a*a + b*b == c*c) rec++;
  }

  printf("%d\n%d\n", rec, hy);
}

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