object Main extends App {
	val sc = new java.util.Scanner(System.in)
	val n = sc.nextInt

	for( i <- 0 until n) {
		val a, b, c = sc.nextInt
		if(isRightAngle(a, b, c))	println("YES")
		else						println("NO")
	}

	def isRightAngle(a: Int, b: Int, c: Int): Boolean = {
		if(a*a + b*b == c*c)	true
		else if(b*b + c*c == a*a)	true
		else if(c*c + a*a == b*b)	true
		else false
	}
}