ans = [0] * 3

loop do
  arr = gets.split.map(&:to_i).sort
  
  break if arr[0] + arr[1] <= arr[2]
  
  case arr[0] ** 2 + arr[1] ** 2
  when (0...arr[2] ** 2)
    ans[2] += 1
  when arr[2] ** 2
    ans[0] += 1
  else
    ans[1] += 1
  end
end

puts "%d %d %d %d" % ans.unshift(ans.inject(:+))