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 c, a, 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
def solve(sides):
    ans = [0, 0, 0, 0]

    for a, b, c in sides:
        # is_triangle
        if a + b > c and b + c > a and c + a > b:
            ans[0] += 1
            # right-angled
            if c ** 2 == a ** 2 + b ** 2:
                ans[1] += 1
            # Obtuse
            elif c ** 2 < a ** 2 + b ** 2:
                ans[2] += 1
            # acute
            elif c ** 2 > a ** 2 + b ** 2:
                ans[3] += 1
        else:
            break

    return ' '.join(map(str, ans))


if __name__ == '__main__':
    while True:
        sides = []
        try:
            while True:
                temp = list(map(int, input().split()))
                sides.append(sorted(temp))
        except EOFError:
            break
    
    print(solve(sides))

Python: result = [0] * 3
while 1:
    a, b, c = sorted(list(map(int, input().split())))
    if a + b > c:
        flag = c * c - b * b - a * a
        if flag == 0:
            result[0] += 1
        elif flag > 0:
            result[1] += 1
        else:
            result[2] += 1
print(sum(result), *result)

Python: def run():
    judge = [0, 0, 0, 0]
    while True:
        a, b, c = sorted((int(x) for x in input().split()))
        if a + b <= c or min([a, b, c]) <= 0:
            print(' '.join(map(str, judge)))
            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: 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: 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

Python: # AOJ 0582: Triangle Types
# Python3 2018.6.30 bal4u

sa = sb = sc = 0;
while True:
	a, b, c, = map(int, input().split())
	if a + b <= c or b + c <= a or c + a <= b: break
	if c < a: c, a = a, c
	if c < b: c, b = b, c
	t = (a*a + b*b) - c*c
	if   t == 0: sa += 1
	elif t  > 0: sb += 1
	else:        sc += 1
print(sa+sb+sc, sa, sb, sc)

Python: if __name__ == '__main__':

    triangle_count = 0
    right_count = 0
    acute_count = 0
    obtuse_count = 0
    while True:
        sides = sorted(list(map(int, input().split())))

        if sides[0] + sides[1] <= sides[2]:
            break

        triangle_count += 1

        judge = sides[2] ** 2 - (sides[0] ** 2 + sides[1] ** 2)
        if judge > 0:
            obtuse_count += 1
        elif judge == 0:
            right_count += 1
        else:
            acute_count += 1

    print(str(triangle_count) + " " + str(right_count) + " " + str(acute_count) + " " + str(obtuse_count) + " ")
    print()

Python: num = 0
triangle = {"chokkaku":0,"eikaku":0,"donkaku":0}
while True:
    hen = list(map(int,input().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: def checkTriangle(a, b, c):
    if a + b > c and a + c > b and b + c > a:
        return True
    return False


def checkOct(a, b, c):
    a, b, c = [i * i for i in [a, b, c]]
    if a + b == c or a + c == b or b + c == a:
        return 0
    elif c < a + b or b < a + c or a < b + c:
        return 1
    else:
        return 2

for i in range(5):
    a, b, c = map(int, input())
    result = [0] * 3
    if checkTriangle(a, b, c):
        result[checkOct(a, b, c)] += 1
print(sum(result),*result)

Python: t1,t2,t3=0,0,0
while 1:
    a=list(map(int,input().split()))
    a.sort()
    if a[0]+a[1]<=a[2]:break
    elif a[0]**2+a[1]**2<a[2]**2:t3+=1
    elif a[0]**2+a[1]**2==a[2]**2:t1+=1
    else:t2+=1
print(t1+t2+t3,t1,t2,t3)

Python: def run():
    judge = [0, 0, 0, 0]
    while True:
        a, b, c = (int(x) for x in sorted(input().split()))
        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: E = 0
D = 0
C = 0
while True :
    a, b, c = map(int, input().split())
    if a + b <= c or b + c <= a or c + a <= b :
        break
    
    x = max(a, b, c)
    z = min(a, b, c)
    y = a + b + c - x - z
    if x**2 == y**2 + z**2 :
        C += 1
    elif x**2 < y**2 + z**2 :
        E += 1
    else :
        D += 1
        
print(C+E+D, C, E, D)

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),l[0],l[1],l[2])

Python: if __name__ == '__main__':

    triangle_count = 0
    right_count = 0
    acute_count = 0
    obtuse_count = 0
    while True:
        sides = sorted(list(map(int, input().split())))

        if sides[0] + sides[1] <= sides[2]:
            break

        triangle_count += 1

        judge = sides[2] ** 2 - (sides[0] ** 2 + sides[1] ** 2)
        if judge > 0:
            obtuse_count += 1
        elif judge == 0:
            right_count += 1
        else:
            acute_count += 1

    print(str(triangle_count) + " " + str(right_count) + " " + str(acute_count) + " " + str(obtuse_count) + " ")