def triangle?(a, b, c)
    return false if a + b <= c
    true
end

sankaku = 0
eikaku = 0
chokaku = 0
donkaku = 0

loop do
    line = gets
    break  if line == "\n"

    a, b, c = line.split.map(&:to_i).sort
    break if !triangle?(a, b, c)

    sankaku += 1
    if a**2 + b**2 > c **2
        eikaku += 1
    elsif a**2 + b**2 == c **2
        chokaku += 1
    else
        donkaku += 1
    end
end

puts "#{sankaku} #{chokaku} #{eikaku} #{donkaku}"

