Go: package main

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
	"strings"
)

var sc = bufio.NewScanner(os.Stdin)

func main() {
	var rectangle, diamond int
	for sc.Scan() {
		l := strings.Split(sc.Text(), ",")
		a, _ := strconv.Atoi(l[0])
		b, _ := strconv.Atoi(l[1])
		c, _ := strconv.Atoi(l[2])

		if a*a+b*b == c*c {
			rectangle++
		}
		if a == b {
			diamond++
		}
	}
	fmt.Println(rectangle)
	fmt.Println(diamond)
}

Python: import sys
rect = 0
loze = 0
for line in sys.stdin:
    s = line.split(',')
    a,b,c = int(s[0]),int(s[1]),int(s[2])
    if a**2 + b**2 == c**2:
        rect += 1
    if a == b and a+b > c:
        loze += 1
print(rect)
print(loze)

Python: import sys
def main():
    r = 0
    d = 0
    for line in sys.stdin:
        A = list(map(int, line.split(",")))
        if A[0] == A[1]:
            d += 1
        else:
            if A[0] ** 2 + A[1] ** 2 == A[2] ** 2:
                r += 1

    print(r)
    print(d)



if __name__ == "__main__":
    main()

Python: rec = 0
dia = 0

while 1:
    try:
        a, b, c = map(int, input().split(","))
    except:
        break

    if a**2 + b**2 == c**2:
        rec += 1
    elif a == b:
        dia += 1

print(rec)
print(dia)

Python: import sys
rect, loze = 0, 0
for line in sys.stdin:
    a, b, c = map(int, (line.strip().split(',')))
    if a**2 + b**2 == c**2:
        rect += 1
    if a == b:
        loze += 1
print(rect)
print(loze)

Python: def get_input():
    while True:
        try:
            yield ''.join(input())
        except EOFError:
            break

N = list(get_input())
ans1 = 0
ans2 = 0
for l in range(len(N)):
    a, b, c = [int(i) for i in N[l].split(",")]
    if a*a + b*b == c*c:
        ans1 += 1
    if a == b:
        ans2 += 1
print(ans1)
print(ans2)

Python: import sys
r=d=0
for e in sys.stdin:
 a,b,c=map(int,e.split(','))
 if a*a+b*b==c*c:r+=1
 if a==b:d+=1
print(r)
print(d)

Python: Rectangle = 0
Rhombus = 0
try:
    while True:
        a, b, c = map(int,input().split(","))
        if a == b :
            Rhombus += 1
        elif a**2 + b**2 == c**2 :
            Rectangle += 1
except EOFError:
    pass
    
print(Rectangle)
print(Rhombus)

Python: import sys
def main():
    ans = [0] * 2
    for line in sys.stdin:
        a,b,c = map(int, line.split())
        if a ** 2 + b ** 2 == c ** 2:
            ans[0] += 1
        else:
            ans[1] += 1

    for a in ans:
            print(a)


if __name__ == "__main__":
    main()

Python: import sys
rect = 0
dia = 0

for s in sys.stdin:
	side1, side2, diag = map(int, s.split(','))
	rect += 1 if diag**2 == side1**2 + side2**2 else 0
	dia += 1 if side1 == side2 else 0

print(rect)
print(dia)

Python: from __future__ import (division, absolute_import, print_function,
                        unicode_literals)
from sys import stdin

rectangle = diamond = 0
for line in stdin:
    try:
        a, b, c = (int(s) for s in line.split(','))
    except ValueError:
        break
    diamond += a == b
    rectangle += a ** 2 + b ** 2 == c ** 2
print(rectangle, diamond, sep='\n')

Python: sq=ss=0
while 1:
	try: a,b,c=map(int,input().split(','))
	except: break
	if a**2 + b**2 == c**2:
		sq+=1
	elif a == b:
		ss+=1
print(sq)
print(ss)

Python: import sys

rect = 0
dia = 0
for line in sys.stdin:
    a,b,c = [int(i) for i in line.split(",")]
    if a**2 + b**2 == c**2:
        rect += 1
    elif a == b or b == c or c == a:
        dia += 1

print(rect)
print(dia)

Python: d,e=0,0
while 1:
    try:
        a,b,c=map(int,input().split(','))
        if a**2+b**2==c**2:d+=1
        elif a==b:e+=1
    except:
        print('{}\n{}'.format(d,e))
        break

Python: rect = 0
dia = 0
while True:
  try:
    a,b,c = map(int,input().split(","))
  except EOFError:
    print(rect)
    print(dia)
    break
  if (a**2+b**2 == c**2):
    rect += 1
  elif (a == b):
    dia += 1

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

int main(void){

    int a,b,c,rectangular = 0,diamond = 0;
    char c1,c2;


    while(cin >> a >> c1 >> b >> c2 >> c){

        if(a * a + b * b == c * c){
            rectangular++;
        }
        if(a == b){
            diamond++;
        }

    }

    cout << rectangular << endl << diamond << endl;

    return 0;
}

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

C++: #include<iostream>
using namespace std;
int main(){

  int a,b,c;
  char x;
  int t=0,h=0;

  while(cin>>a>>x>>b>>x>>c){
    if(a*a+b*b==c*c)
      t++;
    if(a==b)
      h++;
  }
  cout << t << endl << h << endl;
}

C++: #include<iostream>
#include<cmath>
using namespace std;
int main(){
	int a, b, c, rect = 0,rhom = 0;
	while(cin >> a >> b >>c){
		if(a * a + b * b == c * c) rect++;
		if(a == b) rhom++;
	}
	cout << rect << "?\n" << rhom << endl;
}

C++: //include
//------------------------------------------
#include <vector>
#include <list>
#include <map>
#include <set>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cctype>
#include <string>
#include <cstring>
#include <ctime>

using namespace std;

//conversion
//------------------------------------------
inline int toInt(string s) {int v; istringstream sin(s);sin>>v;return v;}
template<class T> inline string toString(T x) {ostringstream sout;sout<<x;return sout.str();}

//math
//-------------------------------------------
template<class T> inline T sqr(T x) {return x*x;}

//typedef
//------------------------------------------
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<string> VS;
typedef pair<int, int> PII;
typedef long long LL;
typedef unsigned long long ULL;

//container util
//------------------------------------------
#define ALL(a)  (a).begin(),(a).end()
#define RALL(a) (a).rbegin(), (a).rend()
#define PB push_back
#define MP make_pair
#define SZ(a) int((a).size())
#define EACH(i,c) for(typeof((c).begin()) i=(c).begin(); i!=(c).end(); ++i)
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define SORT(c) sort((c).begin(),(c).end())

//repetition
//------------------------------------------
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n)  FOR(i,0,n)

//constant
//--------------------------------------------
const double EPS = 1e-10;
const double PI  = acos(-1.0);

//clear memory
#define CLR(a) memset((a), 0 ,sizeof(a))

//debug
#define dump(x)  cerr << #x << " = " << (x) << endl;
#define debug(x) cerr << #x << " = " << (x) << " (L" << __LINE__ << ")" << " " << __FILE__ << endl;

int main() {
  int a, b, c;
  int rec = 0,rho = 0;
  char c1, c2;

  while(cin >> a >> c1 >> b >> c2 >> c) {
    if(a*a + b*b == c*c)rec++;
    else if(a == b)rho++;  
  }
  cout << rec << endl;
  cout << rho << endl;
}

C++: #include<stdio.h>
#include<math.h>
int main(void)
{
	int a,b,c;
	int tyo,hishi;
	tyo=0;
	hishi=0;
	while(scanf("%d,%d,%d",&a,&b,&c)!=EOF){
		if(a==b){
			hishi++;
		}
		if(c*c==a*a+b*b){
			tyo++;
		}
	}
	printf("%d\n%d\n",tyo,hishi);
	return 0;
}

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

C++: //AOJ0032

#include<iostream>

using namespace std;

int main(){

	int x,y,z;
	int sum1=0,sum2=0;
	char tmp;

	while(cin>>x){
		cin>>tmp;
		cin>>y;
		cin>>tmp;
		cin>>z;

		if(x==y){
			sum2++;
		}

		if(x*x+y*y==z*z){
			sum1++;
		}
	}

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

	return 0;
}