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 b > c {
			return b, a, c
		} else {
			return c, b, 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":
					o_t++
				}
				t++
			}	else {
				break
			}
			
	}
	fmt.Println(t, r_t, s_t, o_t)
}

Python: # -*- coding: utf-8 -*-
import sys
from math import sqrt


def calc_triangle_type(edge_length_str):
    edge_length = edge_length_str.split(" ")
    edge_length = list(map(lambda x: int(x), edge_length))
    edge_length_sorted = sorted(edge_length)
    if edge_length_sorted[0] + edge_length_sorted[1] <= edge_length_sorted[2]:
        return None
    right_angled_longest_edge = sqrt(
        edge_length_sorted[0] * edge_length_sorted[0] + edge_length_sorted[1] * edge_length_sorted[1])
    if edge_length_sorted[2] < right_angled_longest_edge:
        return 0
    elif edge_length_sorted[2] == right_angled_longest_edge:
        return 1
    else:
        return 2


def main():
    inputStr = sys.stdin.read()
    lines = inputStr.split("\n")
    counts_by_tryangle_type = {0: 0, 1: 0, 2: 0}
    total_triangle = 0
    for line in lines[:-1]:
        tryangle_type = calc_triangle_type(line)
        if tryangle_type is None:
            break
        counts_by_tryangle_type[tryangle_type] = counts_by_tryangle_type[tryangle_type] + 1
        total_triangle = total_triangle + 1
    print("{} {} {} {}".format(total_triangle,
                               counts_by_tryangle_type[1],
                               counts_by_tryangle_type[0],
                               counts_by_tryangle_type[2]))


if __name__ == '__main__':
    main()

Python: def main():
    eikaku = 0
    donkaku = 0
    chokkaku = 0

    while True:
        a, b, c = sorted([int(a) for a in input().split()])
        if a + b <= c:
            break
        d = a * a + b * b
        if d == c*c:
            chokkaku += 1
        elif d < c*c:
            donkaku += 1
        else:
            eikaku += 1

    print(" ".join([str(a) for a in [eikaku + donkaku + chokkaku, chokkaku, eikaku, donkaku]]))


if __name__ == '__main__':
    main()

Python: #input_f = "3 4 5\n2 1 2\n6 3 4\n1 1 1\n1 2 3"
while():
    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)


    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: import math
triangle_list = [0 for i in range(4)]
while(True):
    point = list(map(int,input().split()))
    point=sorted(point)
    z = math.sqrt(point[0]**2 + point[1]**2)

    if point[2] >= (point[1]+ point[0]):
        break
    elif point[2] < z:
        triangle_list[0] += 1
        triangle_list[2] += 1
    elif point[2] == z:
        triangle_list[0]+= 1
        triangle_list[1]+= 1
    elif point[2] > z:
        triangle_list[0] += 1
        triangle_list[3] += 1

print("{0[0]} {0[1]} {0[2]} {0[3]}".format(triangle_list))

Python: a,b,c,d = 0,0,0,0
while 1:
	lng=list(map(int,input().split()))
	lng.sort()
	if lng[0] + lng[1] <= lng[2]:
		print('%d %d %d %d' % (a,b,c,d))
		break
	else:
		a += 1
		if lng[0]**2 + lng[1]**2 == lng[2]**2:
			b += 1
		elif lng[0]**2 + lng[1]**2 >= lng[2]**2:
			d += 1
		else:
			c += 1

Python: a = 0
b = 0
c = 0

while True:
    t = sorted(list(map(int, input().split())))
    if t[0]+t[1] <= t[2]:
        print(a+b+c, b, a, c)
        break
    elif t[0]**2+t[1]**2 > t[2]**2:
        a += 1
    elif t[0]**2+t[1]**2 == t[2]**2:
        b += 1
    else:
        c += 1

Python: import sys
num = 0
triangle = {"chokkaku":0,"eikaku":0,"donkaku":0}
henn = sys.stdin.readlines()
for i in henn:
    hen = list(map(int,i))
    hen.sort()
    if (hen[0] + hen[1] <= hen[2]) or (hen[1] + hen[2] <= hen[0]) or (hen[2] + hen[0] <= hen[1]):
        break
    else:
        num += 1
        if hen[0]**2 + hen[1] ** 2 == hen[2] **2:
            triangle["chokkaku"] += 1
        elif hen[0] ** 2 + hen[1] ** 2 < hen[2] **2:
            triangle["donkaku"] += 1
        else:
            triangle["eikaku"] += 1

kotae = str(num)+" "+" ".join(list(map(str,triangle.values())))
print(kotae)

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"
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])