Go: package main

import (
	"fmt"
	"sort"
)

// TriangleKind kind of triangle
type TriangleKind int

const (
	// Nothing not triangle
	Nothing TriangleKind = iota
	// RightTriangle the right triangle
	RightTriangle
	// SharpTriangle the sharp triangle
	SharpTriangle
	// ObtuseTriangle the obtuse triangle
	ObtuseTriangle
) // const for Triangle kind

type result struct {
	rTriangle int
	sTriangle int
	oTriangle int
}

func (res *result) String() string {
	return fmt.Sprintf("%d %d %d %d", res.rTriangle+res.sTriangle+res.oTriangle, res.rTriangle, res.sTriangle, res.oTriangle)
}

func checkTriangleType(a int, b int, c int) TriangleKind {
	p := []int{a, b, c}
	sort.Sort(sort.IntSlice(p))
	if !(p[0]+p[1] > p[2] && p[1]+p[2] > p[0] && p[2]+p[0] > p[1]) {
		return Nothing
	}

	c = (p[0] * p[0]) + (p[1] * p[1]) - (p[2] * p[2])
	if c == 0 {
		return RightTriangle
	}
	if c > 0 {
		return SharpTriangle
	}
	return ObtuseTriangle
}

func main() {
	var res = new(result)
	var a, b, c int
	var hasNext = true
	for hasNext {
		fmt.Scanf("%d %d %d", &a, &b, &c)
		switch checkTriangleType(a, b, c) {
		case Nothing:
			hasNext = false
		case RightTriangle:
			res.rTriangle++
		case SharpTriangle:
			res.sTriangle++
		case ObtuseTriangle:
			res.oTriangle++
		}
	}
	fmt.Println(res.String())
}

Python: import sys

def triangle_check(a, b, c):
    e1, e2, e3 = sorted([a, b, c], reverse=True)
    if e1 <= 0 or e2 <= 0 or e3 <= 0: return 0
    if e1 > e2 + e3: return 0
    if e1**2 == e2**2 + e3**2: return 2
    elif e1**2 < e2**2 + e3**2: return 1
    elif e1**2 > e2**2 + e3**2: return 3

ans = [0 for i in range(4)]

lines = sys.stdin.readlines()
for line in lines:
    a, b, c = list(map(int, line.split(' ')))
    rst = triangle_check(a, b, c)
    if rst == 0:
        print(' '.join(list(map(str, ans))))
        break
    ans[0] += 1
    ans[rst] += 1

Python: right,acute,obtuse = 0,0,0

while True:
    triangle = sorted([int(i) for i in input().split()])

    # 三角形の成立条件
    if triangle[2] < triangle[0] + triangle[1]:
        longest_2 = triangle[2] ** 2
        side1_2 = triangle[0] ** 2
        side2_2 = triangle[1] ** 2
        # 直角三角形の成立条件
        if longest_2 == side1_2 + side2_2:
            right += 1
        # 鋭角三角形の成立条件
        elif longest_2 < side1_2 + side2_2:
            acute += 1
        # どちらでもないなら鈍角三角形
        else:
            obtuse += 1
    # 三角形ではないときは終了する
    else:
        break

print('%d %d %d %d' % (right+acute+obtuse,right,acute,obtuse))

Python: sankaku = 0
tyokkaku = 0
eikaku = 0
donkaku = 0
while True:
    inputed_line = input()
    data_str = inputed_line.split(' ')
    data = [int(i) for i in data_str]
    data.sort()
    if data[-1] < data[0] + data[1]:
        sankaku += 1
        if data[-1] ** 2 == data[0] ** 2 + data[1] ** 2:
            tyokkaku += 1
        elif data[-1] ** 2 < data[0] ** 2 + data[1] ** 2:
            eikaku += 1
        elif data[-1] ** 2 > data[0] ** 2 + data[1] ** 2:
            donkaku += 1
    else:
        break

answer_list = [sankaku, tyokkaku, eikaku, donkaku]
answer_str = ' '.join(answer_list)
print(answer_str)

Python: p, r, a, o = 0, 0, 0, 0
while True:
    l, m, n = map(int, input().split())
    if l > m:
        l, m = m, l
    if m > n:
        m, n = n, m
    if l > m:
        l, m = m, l
    if l + m <= n:
        break
    if l ** 2 + m ** 2 == n ** 2:
        r += 1
    elif l ** 2 + m ** 2 > n ** 2:
        a += 1
    elif l ** 2 + m ** 2 < n ** 2:
        o += 1
    p += 1
print(p, r, a, o)

Python: a,o,r = 0,0,0
while 1:
    s = list(map(int,input().split()))
    s.sort()
    if(sum(s[:2]) <= s[2] or sum(s[1:3]) <= s[0] or s[0] + s[2] <= s[1]): break
    b = s[0]**2 + s[1]**2 - s[2]**2
    if b > 0: a+=1
    elif b < 0:o+=1
    else: r+=1         
print("{} {} {} {}".format(sum([a,o,r]),r,a,o))

Python: t, t1, t2, t3 = 0, 0, 0, 0
while 1:
    a, b, c = sorted(map(int,input().split()))
    if a + b <= c: break
    t += 1
    D = a*a + b*b - c*c
    if   D > 0: t2 += 1
    elif D < 0: t3 += 1
    else:       t1 += 1         
print(t, t1, t2, t3)

Python: #input_f = "3 4 5\n2 1 2\n6 3 4\n1 1 1\n1 2 3"
def t_check(a,b,c):
    if a + b > c:
        if b + c > a:
            if a + c > b: return True
    return False



def f_check(a_, b_, c_):
    tmp = []
    tmp.append(a_)
    tmp.append(b_)
    tmp.append(c_)
    sqrts = []
    for i in range(3):
        sqrts.append(tmp[i]**2)
    m = max(sqrts)
    s = sum(sqrts)

    if m == (s - m): return(0)
    if m > (s - m): return(2)
    if m < (s - m): return(1)
    
    
counter=[0,0,0]
    
    
while(1):
    input_f = input()


    t = input_f.split("\n")[i].split()
    fn, sn, tn = int(t[0]),int(t[1]),int(t[2])
    if t_check(fn,sn,tn):
        counter[f_check(fn,sn,tn)] += 1
    else: break
    

print(sum(counter),counter[0], counter[1], counter[2])

Python: count = [0,0,0,0]
while 1:
    s = input()
    s = s.split()
    sum = 0
    sum_2 = 0
    for i in range(3):
        s[i] = int(s[i])
        sum += s[i]
        sum_2 += s[i]**2
    if 2*max(s) >= sum:
        break
    else:
        count[0] += 1
        if 2*max(s)**2 == sum_2:
            count[1] += 1
        elif 2*max(s)**2 < sum_2:
            count[2] += 1
        else:
            count[3] += 1
for i in range(3):
    print(count[i],end = " ")
print(count[3])

Python: count = 0 #三角形の数
right = 0 #直角三角形の数
acute = 0 #鋭角三角形の数
obtuse = 0 #鈍角三角形の数
while True:
    try:
        n = input().split()
    except EOFError:
        print(str(count) + " " + str(right) + " " + str(acute) + " " + str(obtuse))
        break
    m = [float(i) for i in n]
    m.sort() #三角形の各辺を小さい順にｍにリスト化
    MaxArgCos = (m[0] ** 2 + m[1] ** 2 - m[2] ** 2) / (2 * m[0] * m[1]) #三角形の最大角のcosを調べる
    count += 1 #三角形の数のカウント
    if -1 < MaxArgCos < 0:
        obtuse += 1 #鈍角
    elif 0 < MaxArgCos < 1:
        acute += 1 #鋭角
    elif MaxArgCos == 0:
        right += 1 #直角
    else:
        count -= 1 #三角形ではないのでカウントを減らす

Python: tri = 0
right = 0
acute = 0
obtuse = 0

while True:
    a, b, c = map(int, input().split())
    if a < b:
        a, b = b, a
    if b < c:
        b, c = c, b
    if a < b:
        a, b = b, a   
    
    if (a + b > c) and (b + c > a) and (c + a > b):
        tri += 1
        A = b**2 + c**2 - a**2
        if A > 0:
            acute += 1
        elif A == 0:
            right += 1
        else:
            obtuse += 1
    else:
        break

print(tri, right, acute, obtuse)

Python: tri, acute, right, dull = 0, 0, 0, 0
while True:
    a,b,c = map(int, input().split())
    if a+b<=c or abs(a-b)>=c:
        print(tri, right, acute, dull)
        exit()
    else:
        tri += 1
        M = max(a,b,c)
        if M**2 < (a**2+b**2+c**2 -M**2):
            acute += 1
        if M**2 == (a**2+b**2+c**2 -M**2):
            right += 1
        if M**2 > (a**2+b**2+c**2 -M**2):
            dull += 1

Python: import sys


def main(lines=None):
    # ここは変えない
    if not lines:
        lines = sys.stdin.readlines()
    lines = [line.split() for line in lines]
    # ここまで

    lines_int = [sorted(list(map(int, line))) for line in lines]
    a = 0
    b = 0
    c = 0

    for line in lines_int:
        if line[0] + line[1] > line[2]:
            if line[2] ** 2 == line[0] ** 2 + line[1] ** 2:
                a += 1
            elif line[2] ** 2 < line[0] ** 2 + line[1] ** 2:
                b += 1
            elif line[2] ** 2 > line[0] ** 2 + line[1] ** 2:
                c += 1
        else:
            # answer = "{0} {1} {2} {3}".format(a + b + c, a, b, c)
            break

    answer = "{0} {1} {2} {3}".format(a + b + c, a, b, c)

    print(answer)
    return answer


def test_main():
    test_inputs = """
3 4 5
2 1 2
6 3 4
1 1 1
1 2 3
""".strip()
    test_inputs = test_inputs.split("\n")
    answer = main(test_inputs)
    expect = """
4 1 2 1
""".strip()

    assert answer == expect


if __name__ == "__main__":
    main()