let tyk a b c = (a*a) = (b*b+c*c)
let tri a b c = (tyk a b c) or (tyk b a c) or (tyk c a b)
let ans a b c = if tri a b c then Printf.printf "YES\n" else Printf.printf "NO\n"
let main =
	let k = Scanf.scanf "%d\n" (fun x -> x) in
	for i = 0 to k - 1 do
		Scanf.scanf "%d %d %d\n" (fun x y z -> ans x y z)
	done;