Go: ///
// File:  0582.go
// Author: ymiyamoto
//
// Created on Wed Feb 28 22:51:48 2018
//
package main

import (
	"bufio"
	"fmt"
	"os"
)

const (
	steep = iota
	orth
	obtuse
)

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

func triangle(a, b, c int) int {
	if a*a == b*b+c*c {
		return orth
	} else if b*b+c*c-a*a > 0 {
		return steep
	} else {
		return obtuse
	}
}

func main() {
	s := bufio.NewScanner(os.Stdin)

	var num, st, or, ob int
	for s.Scan() {
		var a, b, c int
		fmt.Sscan(s.Text(), &a, &b, &c)

		m, n1, n2 := max(a, b, c)
		if m < n1+n2 {
			switch triangle(m, n1, n2) {
			case steep:
				st++
			case orth:
				or++
			case obtuse:
				ob++
			}
			num++
		} else {
			break
		}
	}
	fmt.Println(num, or, st, ob)
}

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

Python: acute, right, obtuse = 0, 0, 0
while True:
    a, b, c = sorted(map(int, input().split()))
    if a + b <= c:
        print(acute + right + obtuse, right, acute, obtuse)
        break
    d = a ** 2 + b ** 2
    e = c ** 2
    if d == e:
        right += 1
    elif d < e:
        obtuse += 1
    else:
        acute += 1

Python: lista=[]
t=0
ch=0
e=0
d=0
tflag=1
while True:
    try:
        lista.append(list(map(int,input().split())))
    except:
        break;

def func01(a,b,c):
    global t
    global ch
    global e
    global d
    if a+b>c:
        t+=1
        if a**2+b**2==c**2:
            ch+=1
        elif a**2+b**2>c**2:
            e+=1
        elif a**2+b**2<c**2:
            d+=1
    else:
        tflag==0
while(tflag==1):
    for i in range(len(lista)):
        x=sorted(lista[i])
        func01(x[0],x[1],x[2])
print(t,ch,e,d)

Python: #input_f = "3 4 5\n2 1 2\n6 3 4\n1 1 1\n1 2 3"
input_f = input()

counter = [0, 0, 0]

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)

    print(m,s)
    
    if m == (s - m): return(0)
    if m > (s - m): return(2)
    if m < (s - m): return(1)
 
    
for i in range(int(len(input_f))):
    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: 
        print(sum(counter),counter[0], counter[1], counter[2])
        break