def determine(array)
  x = array.sort
  return 'not triangle' if x[0] + x[1] <= x[2]

  x.map! { |y| y**2 }

  if x[0] + x[1] == x[2]
    'chokkaku'
  elsif x[0] + x[1] > x[2]
    'eikaku'
  elsif x[0] + x[1] < x[2]
    'donkaku'
  end
end

a = gets.split.map(&:to_i)
count = Hash.new(0)
total = 0
now = determine(a)

until now == 'not triangle'
  count[now] += 1
  total += 1
  a = gets.split.map(&:to_i)
  now = determine(a)
end

puts "#{total} #{count['chokkaku']} #{count['eikaku']} #{count['donkaku']}"

