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: rec = 0
rho = 0

while True:
    try:
        a, b, c  = map(int, input().split(','))
        if a == b:
            rho += 1
        else:
            if a**2 + b**2 - c**2 == 0:
                rec +=1
                
    except EOFError:
        break

print(rec)
print(rho)

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
    if a == b or b == c or c == a:
        dia += 1

print(rect)
print(dia)

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

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

Python: import sys
x,y=0,0
for line in sys.stdin:
	a,b,c = map(int,line[:-1].split(','))
	if a*a + b*b == c*c:
		x += 1
	if a == b:
		y += 1
print("{}\n{}".format(x,y))

Python: rect = 0
loze = 0

while True:
    try:
        n, m, o = map(int, input().split(','))
        if n ** 2 + m ** 2 == o ** 2:
            rect += 1
        if n == m:
            loze += 1
    except:
        print(rect)
        print(loze)
        break

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

print(rectangles)
print(lozenges)

Python: import sys

t = 0
h = 0
for line in sys.stdin :
    line = list(map(int, line.split(',')))
    if line[2]**2 == line[0] ** 2 + line[1] ** 2 :
        t += 1
    elif line[0] == line[1] :
        h += 1
print(t)
print(h)

Python: c = 0
h = 0
while True:
    try:
        a, b, c = [int(x) for x in input().split(",")]
    except:
        break
    
    if a**2 + b**2 == c**2:
        c += 1
    elif a == b:
        h += 1

print(c)
print(h)

Python: rect_cnt = dia_cnt = 0
 
while True:
  try:
    a, b, c = map(int, input().split(","))
     
    rect_cnt += (a ** 2 + b ** 2 ==  c ** 2)
    dia_cnt += (a == b)
 
  except EOFError:
    break
print(rect_cnt)
print(dia_cnt)

Python: rec = 0
loz = 0

while True:
    try:
        a,b,c = map(int,input().split(','))
    except EOFError:
        break
    if a == b:
        loz += 1
    if a * a + b * b == c * c:
        rec += 1

print(rec)
print(loz)

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

Python: import fileinput
triangle = 0
diamond = 0
for line in fileinput.input():
    if line == "\n":
        break
    else:
        a, b, c = map(int, line.split(","))
        if a**2 + b**2 == c**2:
            triangle += 1
        if a == b:
            diamond += 1
print(triangle)
print(diamond)

Python: import sys


def isRectangle(s1, s2, d):
    if s1*s1 + s2*s2 == d*d:
        return True
    else:
        return False

def isLozenge(s1, s2):
    if s1 == s2:
        return True
    else:
        return False

rcnt = 0
lcnt = 0
L = sys.stdin.readlines()
for dataset in L:
    side1, side2, diagonal = map(int, dataset.split(','))
    if isRectangle(side1, side2, diagonal):
        rcnt += 1
    if isLozenge(side1, side2):
        lcnt += 1
print(rcnt)
print(lcnt)

Python: rect = 0
hish = 0
try:
    while True:
        a, b, c = map(float, input().split(","))
        if a*a + b*b == c*c:
            rect += 1
        if a == b:
            hish += 1
except:
    pass

print(rect)
print(hish)

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

Python: s=0
n=0
while True:
    try:
        a,b,c = map(int, input().split())
    except:
        break

    if a == b:
        n+=1
    elif c**2 == a**2 + b**2:
        s+=1

    print(str(s) + "\n" + str(n))

Python: import sys

c1 = c2 = 0
for line in sys.stdin:
    a, b, c = map(int, line.split(','))
    if a**2 + b**2 == c**2:
        c1 += 1
    elif a == b:
        c2 += 1
print(c1, c2)

Python: import sys
readlines = sys.stdin.readlines
write = sys.stdout.write
def solve():
    v1 = v2 = 0
    for line in readlines():
        a, b, c = map(int, line.split(","))
        if a**2 + b**2 == c**2:
            v1 += 1
        if a == b:
            v2 += 1
    write("%d\n" % v1)
    write("%d\n" % v2)
solve()

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

Python: import sys
  
rec = 0
rhom = 0

for s in sys.stdin:
    a,b,c = [ int(x) for x in s.split(',') ]
    if c**2 == b**2 + a**2:
        rec += 1
    elif a==b and a+b > c:
        rhom += 1

print(rec)
print(rhom)

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

Python: rect = 0
hish = 0
try:
  while True:
    a, b, c =map(int, input().split(","))
    if a*a + b*b == c*c:
      rect += 1
    if a == b:
      hish += 1

except:
  pass

print(rect)
print(hish)

Python: # Aizu Problem 0032: Plastic Board
#
import sys, math, os

# read input:
PYDEV = os.environ.get('PYDEV')
if PYDEV=="True":
    sys.stdin = open("sample-input.txt", "rt")

rectangles, lozenges = 0, 0
while True:
    try:
        a, b, c = [int(_) for _ in input().split(',')]
    except EOFError:
        break
    if a**2 + b**2 == c**2:
        rectangles += 1
    elif a == b:
        lozenges += 1

print(rectangles)
print(lozenges)

Python: rec = rho = 0
while True:
    try:
        a, b, c = map(int, input().split(','))
    except:
        break
    if a ** 2 + b ** 2 == c ** 2:
        rec += 1
    if a == b:
        rho += 1
print(rec, rho, sep='\n')

Python: while True:
  try:
    a, b, c = map(int, input().split(","))
    
    rect_cnt += (a ** 2 + b ** 2 ==  c ** 2)
    dia_cnt += (a == b)

  except EOFError:
    break

print(rect_cnt)
print(dia_cnt)

Python: s = h = 0 #カウンタ変数の初期化
try: #ここから下のエラーをけんちする
    while True: #無限ループ
        a,b,c = map(int,input().split(",")) #入力を","で区切る
        if a ** 2 + b ** 2 == c ** 2:s += 1 #さん平方の定理が成り立つなら長方形
        elif a == b:h += 1 #隣り合う2辺の長さが同じならひし形
        else:pass #それ以外は処理なし
except EOFError: #EOFErrorを拾う
    print(s) #長方形の数を出力
    print(h) #ひし形の数を出力

Python: # -*- coding: utf-8 -*-

import sys
import os


rectangle = 0
diamond = 0
parallelogram = 0

for s in sys.stdin:
    a, b, c = map(int, s.split(','))
    if a**2 + b**2 == c**2:
        rectangle += 1
    elif a == b:
        diamond += 1
    else:
        parallelogram += 1

print(rectangle)
print(diamond)

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