Go: package main
// 三角形の形は辺の長さで決まる． 順番に３つの正整数が与えられたとき， 辺の長さがそれらの値と一致する三角形が存在するかどうかを調べ,
//  存在するなら鋭角三角形，直角三角形，鈍角三角形のいずれかを判定し， 次の入力へ進む． 三角形が存在しないとき， それまでに入力された，
// 三角形，直角三角形，鋭角三角形，鈍角三角形の 個数を空白で区切って出力し， それ以降の入力は無視して終了する
// 入力の中には必ず三角形が存在しないようなものがある と仮定してよい. 入力の行数は判らないが各行には３つの正整数が空白で区切って書かれている．
//  ただし，各整数は100 以下とする.

// return
// 三角形 直角三角形　鈍角三角形 鈍角三角形
import (
	"os"
	"fmt"
	"bufio"
)


var sc = bufio.NewScanner(os.Stdin)

func max(a, b, c int) (int, int, int) {
	if a > b {
		if b > c {
			return a, b, c
		} else {
			return a, c, b
		}
	} else {
		if a > c {
			return b, a, c
		} else {
			return b, c, a
		}
	}
}

func find_trianges(a, b, c int) string {
	a, b, c = max(a, b, c)
	r := b*b + c*c
	if a*a > r {
		return "obtuse_triangle"
	} else if a*a < r {
		return "sharped_triangle"
	} else {
		return "right_triangle"
	}
}

func main() {
	s := bufio.NewScanner(os.Stdin)
	var t, r_t, s_t, o_t int = 0, 0, 0, 0
	for s.Scan() {
		var a, b, c int
		fmt.Sscan(s.Text(), &a, &b, &c)
			a, b, c = max(a, b, c)
			if (a < b + c) {
				r := find_trianges(a, b, c)
				switch r {
				case "right_triangle":
					r_t++
				case "sharped_triangle":
					s_t++
				case "obtuse_triangle":
					r_t++
				}
				t++
			}	else {
				break
			}
			
	}
	fmt.Println(t, r_t, s_t, o_t)
}

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()