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: import sys
num = 0
triangle = {"chokkaku":0,"eikaku":0,"donkaku":0}
for i in sys.stdin:
    hen = list(map(int,i.split()))
    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: num=0
t=0
e=0
d=0
for i in range(109):
    A=input()
    A=A.rstrip().split(" ")
    list1=[int(A[0]),int(A[1]),int(A[2])]
    list1.sort()
    if list1[2]>=list1[0]+list1[1]:
        break
    elif (list1[2])**2==(list1[0])**2+(list1[1])**2:
        num+=1
        t+=1
    elif (list1[2])**2>(list1[0])**2+(list1[1])**2:
        num+=1
        d+=1
    elif (list1[2])**2<(list1[0])**2+(list1[1])**2:
        num+=1
        e+=1
print(num,t,e,d)

Python: def run():
    judge = [0, 0, 0, 0]
    while True:
        a, b, c = sorted((int(x) for x in input().split()))
        print(a, b, c)
        if a + b <= c or min([a, b, c]) <= 0:
            print(' '.join(map(str, judge)))
            print()
            break
        else:
            S = a ** 2 + b ** 2 - c ** 2
            judge[0] += 1
            if S == 0:
                judge[1] += 1
            elif S > 0:
                judge[2] += 1
            else:
                judge[3] += 1





if __name__ == '__main__':
    run()

Python: t,x,y,z=0,0,0,0
while True:
    try:
        a=sorted(list(map(int,input().split())))
        if a[0]+a[1] > a[2]:
            t+=1
            if a[0]**2 + a[1]**2 == a[2]**2:
                x+=1
            elif a[0]**2 + a[1]**2 > a[2]**2:
                y+=1
            else:
                z+=1
        else:
            print( t, x, y, z )
            quit()
    except ValueError:
        break
print( t, x, y, z )

Python: A, B, C = 0, 0, 0  # A直角, B鋭角, C鈍角
while True:
	i = list(map(int, input().split()))
	i.sort()
	a, b, c = i[0], i[1], i[2]
	if c >= a + b:  # 三角形ではない
		break
	a2, b2, c2 = a ** 2, b ** 2, c ** 2
	if c2 == b2 + a2:  # 直角
		A = A + 1
	elif c2 < b2 + a2:  # 鈍角
		B = B + 1
	elif c2 > b2 + a2:  # 鋭角
		C = C + 1

print('{0} {1} {2} {3}'.format(A + B + C, A, B, C))

Python: ss = input()

Python: ans = [0 for i in range(4)]
while True:
  sides = sorted([int(inp) for inp in input().split()])
  if sides[2] >= sides[1] + sides[0]:
    print(ans[0], ans[1], ans[2], ans[3])
    break
  if sides[2]**2 > sides[1]**2 + sides[0]**2:
    ans[3]+=1
  elif sides[2]**2 == sides[1]**2 + sides[0]**2:
    ans[2]+=1
  else:
    ans[1]+=1
  ans[0]+=1

Python: f = True
cnt = 0
l = [0,0,0]
while f:
    t = [int(s) for s in input().split()]
    t.sort()
    if t[0]+t[1] <= t[2]:
        f = False
        continue
    if t[0]**2+t[1]**2 > t[2]**2:
        l[0]+=1
    elif t[0]**2+t[1]**2 == t[2]**2:
        l[1]+=1
    else:
        l[2]+=1
print(sum(l),[s for s in l])

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 #三角形ではないのでカウントを減らす
        print(str(count) + " " + str(right) + " " + str(acute) + " " + str(obtuse))
        break

Python: result = [0] * 3
while 1:
    a = input()
#print(sum(result), *result)

Python: def check(lst):
  c, b, a = lst
  if a >= b + c:
    return -1
  elif a ** 2 > b ** 2 + c ** 2:
    return 3
  elif a ** 2 == b ** 2 + c ** 2:
    return 1
  else:
    return 2

dic = [0] * 4
while True:
  lst = list(map(int,input().split()))
  lst.sort()
  f = check(lst)
  if f == -1:
    print(" ".join(map(str,dic)))
    break
  dic[f] += 1
  dic[0] += 1

Python: tri=0
sh=0
rec=0
dul=0

while True:
    L=input().split( )
    E=[int(L[i]) for i in range(3)]
    mx=max(E)
    sm=sum(E)
    quad_sum=E[0]**2+E[1]**2+E[2]**2

    if mx*2>=sm:
        print(tri,rec,sh,dul)
        break
    else:
        tri+=1
        if mx**2*2>quad_sum:
            dul+=1
        elif mx**2*2==quad_sum:
            rec+=1
        else:
            sh+=1

Python: import sys
num = 0
triangle = {"chokkaku":0,"eikaku":0,"donkaku":0}
for i in sys.stdin:
    hen = list(map(int,i.split()))
    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: import sys
from math import *
ans = [0] * 4
for li in sys.stdin:
    ans[0] += 1
    a = sorted(map(int, li.split()))
    if a[0] + a[1] >= a[2]:
        t = hypot(a[0], a[1])
        if t == a[2] ** 2:
            ans[2] += 1
        elif t < a[2] ** 2:
            ans[1] += 1
        else:
            ans[3] += 1
print(*ans)

Python: A=[]
while True:
    try:
        A.append(sorted(list(map(int,input().split())),reverse=True))

    except:
        break

def triangle_types(X):
    num_of_normal = 0
    num_of_right = 0
    num_of_acute = 0
    num_of_obtuse = 0

    for i in range(len(X)):
        a,b,c = [X[i][j] for j in range(3)]
        if (a < b + c and b < a + c and c < a + b):
            num_of_normal +=1
            if (a**2 == b**2 + c**2):
                num_of_right += 1
            elif (a**2 < b**2 + c**2):
                num_of_acute +=1
            elif (a**2 > b**2 + c**2):
                num_of_obtuse += 1
        else:
            print("{} {} {} {}".format(num_of_normal,num_of_right,num_of_acute,num_of_obtuse))
            return


if __name__ == '__main__':
    triangle_types(A)

Python: cho,ei,don = 0,0,0
while(True):
    tmp = list(map(int, input().split()))
    tmp.sort()
    a,b,c = tmp[0],tmp[1],tmp[2]
    if a + b <= c:
        break
    else:
        a2 , b2 , c2 = a ** 2, b ** 2, c ** 2
        if a2 + b2 == c2:
            cho += 1
        elif a2 + b2 < c2:
            don += 1
        else:
            ei += 1
print(cho+ei+don,cho,ei,don)