import java.util.*;

public class Main {
    public static void main(String[] args) {
	Scanner s = new Scanner(System.in);
	int N = s.nextInt();
	for(int tc = 0; tc < N; ++tc) {
	    int[] len = new int[3];
	    for(int i = 0; i < 3; ++i) {
		len[i] = s.nextInt();
	    }
	    Arrays.sort(len);
	    if(len[0]*len[0] + len[1]*len[1] == len[2]*len[2]) {
		System.out.println("YES");
	    } else {
		System.out.println("NO");
	    }
	}
    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) {
	Scanner s = new Scanner(System.in);
	int N = s.nextInt();
	for(int tc = 0; tc < N; ++tc) {
	    int[] len = new int[3];
	    for(int i = 0; i < 3; ++i) {
		len[i] = s.nextInt();
	    }
	    Arrays.sort(len);
	    if(len[0]*len[0] + len[1]*len[1] == len[2]*len[2]) {
		System.out.println("YES");
	    } else {
		System.out.println("NO");
	    }
	}
    }
} Main public static void main(String[] args) {
	Scanner s = new Scanner(System.in);
	int N = s.nextInt();
	for(int tc = 0; tc < N; ++tc) {
	    int[] len = new int[3];
	    for(int i = 0; i < 3; ++i) {
		len[i] = s.nextInt();
	    }
	    Arrays.sort(len);
	    if(len[0]*len[0] + len[1]*len[1] == len[2]*len[2]) {
		System.out.println("YES");
	    } else {
		System.out.println("NO");
	    }
	}
    } main {
	Scanner s = new Scanner(System.in);
	int N = s.nextInt();
	for(int tc = 0; tc < N; ++tc) {
	    int[] len = new int[3];
	    for(int i = 0; i < 3; ++i) {
		len[i] = s.nextInt();
	    }
	    Arrays.sort(len);
	    if(len[0]*len[0] + len[1]*len[1] == len[2]*len[2]) {
		System.out.println("YES");
	    } else {
		System.out.println("NO");
	    }
	}
    } Scanner s = new Scanner(System.in); s new Scanner(System.in) int N = s.nextInt(); N s.nextInt() s.nextInt s for(int tc = 0; tc < N; ++tc) {
	    int[] len = new int[3];
	    for(int i = 0; i < 3; ++i) {
		len[i] = s.nextInt();
	    }
	    Arrays.sort(len);
	    if(len[0]*len[0] + len[1]*len[1] == len[2]*len[2]) {
		System.out.println("YES");
	    } else {
		System.out.println("NO");
	    }
	} int tc = 0; int tc = 0; tc 0 tc < N tc N ++tc ++tc tc {
	    int[] len = new int[3];
	    for(int i = 0; i < 3; ++i) {
		len[i] = s.nextInt();
	    }
	    Arrays.sort(len);
	    if(len[0]*len[0] + len[1]*len[1] == len[2]*len[2]) {
		System.out.println("YES");
	    } else {
		System.out.println("NO");
	    }
	} {
	    int[] len = new int[3];
	    for(int i = 0; i < 3; ++i) {
		len[i] = s.nextInt();
	    }
	    Arrays.sort(len);
	    if(len[0]*len[0] + len[1]*len[1] == len[2]*len[2]) {
		System.out.println("YES");
	    } else {
		System.out.println("NO");
	    }
	} int[] len = new int[3]; len new int[3] 3 for(int i = 0; i < 3; ++i) {
		len[i] = s.nextInt();
	    } int i = 0; int i = 0; i 0 i < 3 i 3 ++i ++i i {
		len[i] = s.nextInt();
	    } {
		len[i] = s.nextInt();
	    } len[i] = s.nextInt() len[i] len i s.nextInt() s.nextInt s Arrays.sort(len) Arrays.sort Arrays len if(len[0]*len[0] + len[1]*len[1] == len[2]*len[2]) {
		System.out.println("YES");
	    } else {
		System.out.println("NO");
	    } len[0]*len[0] + len[1]*len[1] == len[2]*len[2] len[0]*len[0] + len[1]*len[1] len[0]*len[0] len[0] len 0 len[0] len 0 len[1]*len[1] len[1] len 1 len[1] len 1 len[2]*len[2] len[2] len 2 len[2] len 2 {
		System.out.println("YES");
	    } System.out.println("YES") System.out.println System.out System System.out "YES" {
		System.out.println("NO");
	    } System.out.println("NO") System.out.println System.out System System.out "NO" String[] args args public class Main {
    public static void main(String[] args) {
	Scanner s = new Scanner(System.in);
	int N = s.nextInt();
	for(int tc = 0; tc < N; ++tc) {
	    int[] len = new int[3];
	    for(int i = 0; i < 3; ++i) {
		len[i] = s.nextInt();
	    }
	    Arrays.sort(len);
	    if(len[0]*len[0] + len[1]*len[1] == len[2]*len[2]) {
		System.out.println("YES");
	    } else {
		System.out.println("NO");
	    }
	}
    }
} public class Main {
    public static void main(String[] args) {
	Scanner s = new Scanner(System.in);
	int N = s.nextInt();
	for(int tc = 0; tc < N; ++tc) {
	    int[] len = new int[3];
	    for(int i = 0; i < 3; ++i) {
		len[i] = s.nextInt();
	    }
	    Arrays.sort(len);
	    if(len[0]*len[0] + len[1]*len[1] == len[2]*len[2]) {
		System.out.println("YES");
	    } else {
		System.out.println("NO");
	    }
	}
    }
} Main
import java.util.*;

public class Main {
    public static void main(String[] args) {
	Scanner s = new Scanner(System.in);
	int N = s.nextInt();
	for(int tc = 0; tc < N; ++tc) {
	    int[] len = new int[3];
	    for(int i = 0; i < 3; ++i) {
		len[i] = s.nextInt();
	    }
	    Arrays.sort(len);
	    if(len[0]*len[0] + len[1]*len[1] == len[2]*len[2]) {
		System.out.println("YES");
	    } else {
		System.out.println("NO");
	    }
	}
    }
}