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<cstdio>
#include<algorithm>
using namespace std;
bool slove(int n, int a, int b, int c){ 
	if(n==1){
		if(c*c == a*a + b*b)
			return true;
	}
	if(n==2){
		if((a==b || b==c || c==a) && !(a==b && b==c && c==a))
			return true;
	}
	return false;
}
int main(){
	int a,b,c,con_h=0,con_t=0;
	vector<int> n;
	bool flag;
	while(scanf("%d,%d,%d",&a,&b,&c) != EOF){
		n.clear();
		n.push_back(a); n.push_back(b); n.push_back(c); sort(n.begin(), n.end());
		vector<int>::iterator it = n.begin();
		flag = slove(1, *it,*(it+1),*(it+2));
		if(flag == true)
			con_h++;
		else{
			flag = slove(2, *it,*(it+1),*(it+2)); 
			if(flag == true)
				con_t++;
		}
	}
	cout << con_t << endl << con_h << endl;
}

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

using namespace std;

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

C++: // Volume 0 0032 Plastic Board
// 答えを見た（,の扱いがわからなかったので、、）
#include <stdio.h>
using namespace std;

int main() {
    int a, b, c = 0;
    int l = 0;
    int r = 0;

    while (scanf("%d,%d,%d", &a, &b, &c) != EOF) {
        //printf("a:%d, b:%d, c:%d, r:%d, l:%d\n", a, b, c, r, l);
        if (a*a + b*b == c*c) {
            r++;
        } else {
            if (a == b)
                l++;
        }
    }   
    printf("%d\n%d\n", r, l); 
    return 0;
}

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

using namespace std;
using ll = long long;
using pii = pair<int, int>;

int main() {
  cin.tie(0);
  ios_base::sync_with_stdio(false);
  cout << fixed << setprecision(10);
  
  int a, b, c;
  char ch;
  int p = 0, q = 0;
  while (cin >> a >> ch >> b >> ch >> c) {
    p += (a * a + b * b == c * c);
    q += (a == b);
  }
  cout << p << endl;
  cout << q << endl;

  return 0;
}

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

int main() {
	char d;
	int count1 = 0;
	int count2 = 0;
	for (int a, b, c; cin >> a >> d >> b >> d >> c;) {
		if (a * a + b * b == c * c) {
			++count1;
		}
		else if (a * a - c * c / 4 == b * b - c * c / 4) {
			++count2;
		}
	}
	cout << count1 << endl << count2 << endl;
	return 0;
}

C++: #include <iostream>
#include <map>
#include <vector>
#include <cmath>
#include <iomanip>
#include <string>
#include <queue>
#include <algorithm>
#include <cctype>
#define shosu(x) fixed<<setprecision(x)
using namespace std;
typedef long long ll;
typedef pair<int,int> P;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<P> vp;
typedef vector<vp> vvp;
typedef pair<int,P> pip;
typedef vector<pip> vip;
const int inf=1<<30;
const double pi=acos(-1);

int a,b,c,tyo=0,hi=0;
char t;

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

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 if(a == b)
		{
			++diamond;
		}
	}
	cout << rect << endl;
	cout << diamond << endl;
}

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

C++: #include <algorithm>
#include <cstdio>
#include <iostream>
#include <map>
#include <cmath>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
#include <stdlib.h>
#include <stdio.h>
using namespace std;

#define pb         push_back
#define mp         make_pair
#define ll         long long
#define PI         acos(-1.0)
#define ALL(A)     ((A).begin(), (A).end())
#define vsort(v)   sort(v.begin(),v.end())
#define FOR(I,A,B) for(int I = (A); I < (B); ++I)

int main(){
    int a,b,c;
    int sq=0,hishi=0;
    while(scanf("%d,%d,%d\n",&a,&b,&c)==1){
        if(a*a+b*b==c*c) sq++;
        if(a==b) hishi++;
    }
    cout << sq << endl;
    cout << hishi << 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);
     a=arr[count][0];
     b=arr[count][1];
     c=arr[count][2];
     count++;
       for(int i=0;i<count-1;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 if(a==b||a==c||b==c) count2++;          
       } 
      //if(count==4) break;                               
   }
   cout<<count1<<endl;
   cout<<count2<<endl;  
   //while(1);     
   return 0;  
 }

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

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

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

	std::cout<<rec<<std::endl<<dia<<std::endl;
	
	return 0;
}

C++: #include <stdio.h>
#include <math.h>
#include <algorithm>

using namespace std;



int main(){
	int a,b,c,tyou = 0,hishi = 0;

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

	printf("%d\n%d\n",tyou,hishi);

	return 0;
}

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

int main() {
	int a,b,c,n1=0,n2=0;
	while(scanf("%d,%d,%d",&a,&b,&c)>0){
		if(a==b && a*a+b*b==c*c) continue;
		if(a*a+b*b==c*c) n1++;
		if(a==b) n2++;
	}cout<<n1<<endl<<n2<<endl;
}

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)!=EOF){
//if(a==0&&b==0&&c==0){break;}
if(a*a+b*b==c*c){d++;}
if(a==b){e++;}}
cout<<d<<endl<<e<<endl;}

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] ) lozenge.insert(temp);
		else rectangle.insert(temp);
	}
	cout << rectangle.size() << endl;
	cout << lozenge.size() << endl;
}

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

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

if(a*a+b*b==c*c)y++;
else if(a==b)x++;
}
printf("%d/n%d/n",y,x);
return 0;
}

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

using namespace std;

int main(void)
{
    ios::sync_with_stdio(false);
    int a,b,c;
    int ans1,ans2;
    ans1=ans2=0;
    while(~scanf("%d,%d,%d",&a,&b,&c)) {
        if(a*a + b*b == c*c) ans1++;
        if(a==b) ans2++;
    }
    cout << ans1 << endl;
    cout << ans2 << endl;

    return 0;
}