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 <cstdio>
#include <cmath>

using namespace std;

bool rect(int a, int b, int c) {
	return pow(c,2)==pow(b,2)+pow(a,2);
}

int main() {
	int fs, ss, di, rec=0, loz=0;
	while (scanf("%d,%d,%d",&fs,&ss,&di)!=EOF) {
		if (fs!=ss&&rect(fs,ss,di)) rec++;
		else if (!rect(fs,ss,di)&&fs==ss) loz++;
	}
	cout << rec << endl;
	cout << loz << endl;
}

C++: #include<cstdio>

int main(void) {
	int a, b, c;
	int x, y;

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

	return 0;
}

C++: #include <iostream>
#include <algorithm>
using namespace std;
int main(void){
	int a[3],ans[2];
	char com;
	ans[0]=0;ans[1]=0;
	while(cin>>a[0]>>com>>a[1]>>com>>a[2]){
		if(a[2]*a[2]==a[0]*a[0]+a[1]*a[1])ans[0]++;
		if(a[0]==a[1])ans[1]++;
	}
	cout<<ans[0]<<endl<<ans[1]<<endl;
	return 0;
}

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

C++: #define	_USE_MATH_DEFINES
#include <iostream>
#include <algorithm>
#include <functional>
#include <vector>
#include <cstdio>
#include <string>
#include <cmath>
#include <cfloat>
#include <map>
#include <queue>
#include <stack>
#include <list>
using namespace std;
int main(){
	
	int x=0,y=0;
	int a,b,c;
	char comma;
	while(scanf("%d,%d,%d",&a,&b,&c)!=EOF){
		if(pow(a,2)+pow(b,2)==pow(c,2))
			x++;
		if(pow(a,2)-pow(double(c)/2,2)==pow(b,2)-pow(double(c)/2,2))
			y++;
	}
	
	cout<<x<<endl;
	cout<<y<<endl;
	
}

C++: #include <iostream>
#include <string>
#include <algorithm>
#include <functional>
#include <vector>
#include <utility>
#include <cstring>
#include <iomanip>
#include <numeric>
#include <cmath>
#include <queue>
#include <map>
using namespace std;
typedef long long ll;
const int INF = 1<<30; 
const int MOD = 1e9 + 7;
const int dy[] = {1, 0, -1, 0};
const int dx[] = {0, 1, 0, -1};
int main()
{
    cin.tie(0);
    ios::sync_with_stdio(false);
    int a, b, c;
    char bother;
    int ans1 = 0, ans2 = 0;
    while(cin >> a >> bother >> b >> bother >> c)
    {
        if(a * a + b * b == c * c) ans1++;
        if(a == b) ans2++;
    }
    cout << ans1 << "\n" << ans2 << endl;
    return 0;
}

C++: #include <cstdio>
#include <cstring>
int len,t1=0,t2 = 0;
int main(){
    int x,y,z;
    len = 0;
    t1 = 0;
    t2 = 0;
    int t = 0;
    while(scanf("%d,%d,%d",&x,&y,&z)!=EOF){
        if(x*x+y*y==z*z) t1++;
        if(x==y) t2++;
    }
    printf("%d\n%d\n",t1,t2);
}

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';
		if(a[0]==a[1])b++;
		if((a[0]*a[0]+a[1]*a[1])==a[2]*a[2])c++;
	}
	cout<<c<<endl<<b<<endl;
}

C++: #include<iostream>
#include<string>
#include<vector>
#include<cstdio>
#include<sstream>
#include<algorithm>
#include<cmath>
#include<map>
#include<functional>
using namespace std;
int stoi(string x){stringstream ss;ss<<x;int tmp;ss>>tmp;return tmp;}
string itos(int x){stringstream ss;ss<<x;return ss.str();}
int main(){
	int a,b,c,d=0,e=0;
	while(scanf("%d,%d,%d",&a,&b,&c)!=EOF){
	if(a*a+b*b==c*c)d++;
	if(a==b)e++;
	}
	printf("%d\n%d\n",d,e);
	return 0;
}

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

int main(int argc, char **argv)
{
  int x, y, diag, rect, loze;
  char c;
  rect = loze = 0;
  for (;;) {
    cin >> x >> c >> y >> c >> diag;
    if (cin.eof())
      break;
    if (x*x+y*y==diag*diag)
      rect++;
    if (x == y)
      loze++;
  }
  cout << rect << endl;
  cout << loze << endl;
  return 0;
}

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

int main(){
  int a,b,c;
  int t = 0,h = 0;
  while(scanf("%d,%d,%d",&a,&b,&c) != EOF){
    int m = max(a,max(b,c));
    //if(a == b && a == c) continue;
    if(m == c){
      if(a == b) h++;
      else t++;
    }
  }
  cout << t << endl << h << endl;
}

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

int a, b, c, r = 0, d = 0;

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

	return 0;
}

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

int main(){
	int ca=0;
	int cb=0;
	int a,b,c;
	char n;
	while(a!=EOF){
		cin>>a>>n>>b>>n>>c;
		
		if((a*a)+(b*b)==c*c){
			++ca;
			}
			
		if(a==b&&a+b>c){
			++cb;
			}	
		}
		cout<<ca<<endl<<cb<<endl;
		return 0;
	}

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

C++: #include<iostream>

using namespace std;
/*
struct data{
  int a;
  int b;
  int x;
};
*/
//int judge(int);
//struct data bord[10000];

main(){
  int i;
  i=0;
  int out1=0;
  int out2=0;
  int judge=0;
  int x2=0;
  int a, b, x;
  while(1){
    if(scanf("%d,%d,%d",&a,&b,&x)== EOF)break;
    //cout << bord[i].a << endl<< bord[i].b << endl << bord[i].x<< endl;
    x2 = x;
    x *= x;
    if(a != b && x == a*a + b*b )out1++;
    else if (a == b && x2 <= a+b)  out2++;
    //cout << out1 << endl << out2 << endl;
    
    /* 
       if(judge( i)==0)out1++;
       else out2++;
    */
    i++;
  }
  
  cout << out1 << endl << out2 << endl;


  return 0;
}

/*
judge(int i ){
  
  if(bord[i].a == bord[i].b )return 1;//()
  else return 0;
}
*/

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

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

C++: #define _USE_MATH_DEFINES
#include<iostream>
#include<vector>
#include<algorithm>
#include<string>
#include<cmath>
#include<list>
#include<stack>
#include<queue>
#include<cctype>
#include<iomanip>
#include<functional>
#include<numeric>
#include<map>
#include<set>
#define EPS 1e-10
using namespace std;
typedef long long llong;
bool isrectangle(int a, int b, int c) {
	if (a != b&&a*a + b*b == c*c)return true;
	else return false;
}
bool islozenge(int a, int b, int c) {
	if (a == b)return true;
	else return false;
}
int main() {
	int a, b, c;
	char x;
	int r = 0, l = 0;
	while (cin >> a >> x >> b >> x >> c) {
		if (isrectangle(a, b, c))r++;
		if (islozenge(a, b, c))l++;
	}
	cout << r << endl << l << endl;
	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;
  vector<int> edge;

  while(cin >> x){
	cin.ignore();
	cin >> y;
	cin.ignore();
	cin >> z;
	if(x == y) lozenge++;
	if(x * x + y * y == z * z) rectangle++;
	
  }
  cout << rectangle << endl;
  cout << lozenge << endl;

  return 0;
}

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