arr = [0, 0, 0]
while true
    edge = gets.chomp.split.map(&:to_i).sort
    break if edge.max >= edge.inject(:+) - edge.max
    c2 = edge.max ** 2
    edge.pop
    a2b2 = edge.map{|e| e ** 2}.inject(:+)
    type = 2
    if a2b2 == c2
        type = 0
    elsif a2b2 > c2
        type = 1
    end
    arr[type] += 1
end
puts arr.inject(:+).to_s + " " + arr.join(" ")

