import java.util.Scanner

object Main{
    def main(args:Array[String]):Unit = {
        val scan = new Scanner(System.in)
        val max = scan.nextInt()
        var res = Array[String]()
        for(i <- 1 to max){
            var a = scan.nextInt()
            var b = scan.nextInt()
            var c = scan.nextInt()
            if(Math.pow(a,2)+Math.pow(b,2) == Math.pow(c,2) ||
               Math.pow(c,2)+Math.pow(a,2) == Math.pow(b,2) ||
               Math.pow(c,2)+Math.pow(b,2) == Math.pow(a,2)
              )
              res :+= "YES"
            else
              res :+= "NO"
        }
        res.foreach(println _)
    }
}