#!/usr/bin/env ruby

input = STDIN.readlines
n = input[0].split[0].to_i
1.upto(n) do |i|
  line = input[i]
  a, b, c = line.split.map {|x| x.to_i }
  if a ** 2 + b ** 2 == c ** 2
    puts "YES"
  else
    puts "NO"
  end
end

