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

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

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

using namespace std;
int main()
 {
     int a[4];
     char ch;
     int r=0,l=0;
     while(scanf("%d%c%d%c%d",&a[0],&ch,&a[1],&ch,&a[2])!=EOF)
      {

          if((a[0]*a[0])+(a[1]*a[1])==(a[2]*a[2]))
           r++;
          if(a[0]==a[1]||a[1]==a[2])
           l++;
      }
      printf("%d\n%d\n",r,l);
      return 0;
 }

C++: #define _GLIBCXX_DEBUG
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define ALL(v) v.begin(), v.end()
typedef long long ll;

template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; }

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

int main(){
  
  int a,b,c;
  char x,y;
  int cnt1=0;
  int cnt2=0;
  while(cin>>a>>x>>b>>y>>c){
    if(a*a+b*b==c*c) cnt1++;
    if(a==b) cnt2++;
  }
  
  cout<<cnt1<<endl;
  cout<<cnt2<<endl;
      
  return 0;
}

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

void solve()
{
	int rectCount = 0;
	int diamondCount = 0;
	int a, b, c;
	while(scanf("%d,%d,%d", &a, &b, &c) != EOF)
	{
		if(a * a + b * b == c * c)
		{
			++rectCount;
		}
		if(a == b)
		{
			++diamondCount;
		}
	}
	cout << rectCount << endl;
	cout << diamondCount << endl;
}

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

C++: #include<iostream>
#include<stdio.h>
#include<math.h>
#include<vector>
#include<string>
#include<algorithm>
using namespace std;
int main(){
	int a, b, c, sum1,sum2;
	sum1 = 0;
	sum2 = 0;
	while (scanf("%d,%d,%d",&a,&b,&c)!=EOF) {
		if (a*a + b*b == c*c) {
			sum1 += 1;
		}
		if (a == b) {
			sum2 += 1;
		}
	}
	cout << sum1 << endl;
	cout << sum2 << endl;
	return 0;
}

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

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

C++: #include <iostream>
#include <vector>
#include <string>
#include <sstream>

std::vector<std::string> split(std::string &str, char delim) {
	std::vector<std::string> result;
	std::istringstream is(str);
	std::string buf;
	while (getline(is, buf, delim)) {
		result.push_back(buf);
	}
	return result;
}

bool inputDataSet(std::vector<int> *l) {
	std::string line;
	if (!getline(std::cin, line)) { return false; }
	const std::vector<std::string> tokens(split(line, ','));
	if (tokens.size() != 3) { return false; }
	l->clear();
	for (std::vector<std::string>::const_iterator it = tokens.begin(); it != tokens.end(); ++it) {
		std::istringstream is(*it); int x;
		is >> x;
		l->push_back(x);
	}
	return true;
}

int main() {
	int nr = 0, nl = 0;
	std::vector<int> l(3);
	while (inputDataSet(&l)) {
		if (l[0] * l[0] + l[1] * l[1] == l[2] * l[2]) { ++nr; }
		if (l[0] == l[1]) { ++nl; }
	}
	std::cout << nr << std::endl;
	std::cout << nl << std::endl;
	return 0;
}

C++: #include <iostream>
#include <cstdio>
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++;
		if(a==b)hishi;
	}
	cout << tyou << endl << hishi <<endl;
  return 0;
}

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

int main() {
	int a, b, c;
	int co = 0, cp = 0;
	while (scanf_s("%d,%d,%d", &a, &b, &c) + 1) {
		if ((a*a) + (b*b) == c*c) {
			co++;
		}
		if (a + b > c) {
			cp++;
		}
	}
	cout << co << "\n" << cp << endl;
	return 0;
}

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] || temp[1] == temp[2] ) lozenge.insert(temp);
		else if( num[0]*num[0]+num[1]*num[1] == num[2]*num[2] ) rectangle.insert(temp);
	}
	/*
	set<string>::iterator it1 = rectangle.begin();
	set<string>::iterator it2 = lozenge.begin();
	for(; it1!=rectangle.end(); it1++ ) cout << *it1 << endl;
	cout << endl;
	for(; it2!=lozenge.end(); it2++ ) cout << *it2 << endl;
	cout << endl;
	*/
	cout << rectangle.size() << endl;
	cout << lozenge.size() << endl;
}

C++: #include <iostream>
#include <stdio.h>

using namespace std;

int main(){
	int a,b,c;
	int ans1 = 0 , ans2 = 0;

	while(scanf("%d,%d,%d", &a , &b , &c) != EOF){

		//if(a == 0 && b == 0 && c == 0) break;
		if(a != b && a != c){
			ans2++;
		}
		if(a == b && a != c && b != c){
			ans1++;
		}
	}

	cout << ans1 << endl;
	cout << ans2 << 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 <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 <iostream>
using namespace std;
int main(void){
  int a,b,c,ans=0,ans2=0;
  char ch;
  while(cin>>a>>ch>>b>>ch>>c){
    if(a*a +b*b == c*c)
         ans = ans + 1;
    if(a == b)
    ans2 = ans2 + 1;
    }
    cout << ans << endl;
    cout << ans2 << endl;
    return 0;
  }

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

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

C++: #include <bits/stdc++.h>
 
using namespace std;
 
/*-------------------------------*/
#define FOR(i, a, b) for(int i = (a); i < (b); i++) 
#define RFOR(i, a, b) for(int i = (b) - 1; i >= (a); i--)
#define REP(i, n) for(int i = 0; i < (n); i++)
#define RREP(i, n) for(int i = (n) - 1; i >= 0; i--)
#define all(i) (i).begin(),(i).end()
#define pb push_back
#define mp make_pair 
 
typedef long long ll;
typedef pair<int, int> pint;
typedef vector<int> vi;
typedef vector<vector<int> > vii;
typedef vector<long long> llv;
typedef vector<pint> vpint;
/*-------------------------------*/
 
int main(void)
{
  int a[3];
  char b[2];
  int rect = 0, rhom = 0;
  
  while (cin >> a[0] >> b[0] >> a[1] >> b[1] >> a[2]){
    if (x[0] == x[1]) rhom++;
    else if(a[0] * a[0] + a[1] * a[1] == a[2] * a[2]) rect++;
  }
  cout << rect << "\n" << rhom << endl;

  return 0;
}

C++: #include <iostream>
#include <stdio.h>

using namespace std;

int main(){
	int a,b,c;
	int ans1 = 0 , ans2 = 0;

	while(scanf("%d,%d,%d", &a , &b , &c)){

		if(a == 0 && b == 0 && c == 0) break;
		if(a != b && a != c && b != c){
			ans1++;
		}
		if(a == b && a != c && c != b){
			ans2++;
		}
	}

	cout << ans1 << endl;
	cout << ans2 << endl;

	return 0;
}