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

a = []
for line in sys.stdin:
    a.append(list(map(int,line.split())))
t = [0 for i in range(3)]
for i in range(len(a)):
    a[i].sort()
    if a[i][2] >= a[i][0] + a[i][1]:
        break
    b = a[i][2] ** 2
    c = a[i][0] ** 2 + a[i][1] ** 2
    if b > c:
        t[2] += 1
    elif b < c:
        t[1] += 1
    else:
        t[0] += 1
print("{0} {1} {2} {3}".format(sum(t), t[0], t[1], t[2]))

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


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

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

Python: import math

flag = 0
ans = [0] * 4

while 1:
    try:
        side = list(map(int, input().split()))
    except EOFError:
        print(' '.join(str(a) for a in ans))
        break

    side.sort(reverse=True)
    a, b, c = side

    if flag:
        continue

    if a >= b + c:
        flag = 1
        continue
    else:
        ans[0] += 1
        bc = math.sqrt(b**2 + c**2)
        if a == bc:
            ans[1] += 1
        elif a < bc:
            ans[2] += 1
        else:
            ans[3] += 1

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

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]:
        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: f = True
cnt = 0
l = [0,0,0]
while f:
    t = []
    t.append(int(input()))
    t.append(int(input()))
    t.append(int(input()))
    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: A =[] 
while True:
    try:
        A.append(sorted(list(map(int,input().split())),reverse=True))

    except:
        break
        #または、quit(),os.exit()をして止める。


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

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

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

Python: lista=[]
t=0
ch=0
e=0
d=0
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
for i in range(len(lista)):
    x=sorted(lista[i])
    func01(x[0],x[1],x[2])
print(t,ch,e,d)

Python: # coding=utf-8
import math


def is_triangle(sides_list):
    if sides_list[0] >= sides_list[1] + sides_list[2]:
        return False
    if sides_list[0] <= math.fabs(sides_list[1] - sides_list[2]):
        return False
    return True


def is_right_triangle(sides_list):
    sides_list.sort()
    if sides_list[2]**2 > sides_list[1]**2 + sides_list[0]**2:
        return 3
    if sides_list[2]**2 < sides_list[1]**2 + sides_list[0]**2:
        return 2
    if sides_list[2] ** 2 == sides_list[1] ** 2 + sides_list[0] ** 2:
        return 1


if __name__ == '__main__':
    counter = [0, 0, 0, 0]
    while True:
        sides = list(map(int, input().split()))
        if not is_triangle(sides):
            break
        counter[0] += 1
        counter[is_right_triangle(sides)] += 1

    print(' '.join(map(str, counter)))

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: a,b,c = map(int,input().split())

Python: ans=[0]*4
while True:
    a,b,c=sorted(list(map(int,input().split(" "))))
    if a+b<=c:break
    d=a*a+b*b-c*c
    ans[0]+=1
    ans[1]+=d==0
    ans[2]+=d>0
    ans[3]+=d<0
print(*ans)

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