import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

/**
 * 0003：Is it a Right Triangle?
 * 
 * @author Lyu
 * @version 2015/07/12
 */
public class Main {

    /** 区切り文字：スペース */
    private static final String DELIMITER_SPACE = " ";

    /**
     * データセットで与えられた数を3辺とする三角形が直角三角形かを判断する。
     * 
     * @param args
     * @throws IOException
     * @throws NumberFormatException
     */
    public static void main(String[] args) throws NumberFormatException, IOException {

        List<String[]> dataSets = new ArrayList<String[]>();
        int countOfDataSet = getInput(dataSets);

        for (int i = 0; i < countOfDataSet; ++i) {
            System.out.println(getResult(dataSets.get(i)));
        }
    }

    private static String getResult(String[] dataSets) {
        int[] lengths = new int[3];
        toIntArray(3, lengths, dataSets);
        Arrays.sort(lengths);

        if (isRightTriangle(lengths)) {
            return "YES";
        } else {
            return "NO";
        }
    }

    private static boolean isRightTriangle(int[] lengths) {
        if (lengths[2] * lengths[2] == lengths[0] * lengths[0] + lengths[1] * lengths[1]) {
            return true;
        }
        return false;
    }

    private static void toIntArray(int lengthOfArray, int[] intArray, String[] stringArray) {
        for (int i = 0; i < lengthOfArray; ++i) {
            intArray[i] = Integer.parseInt(stringArray[i]);
        }
    }

    private static int getInput(List<String[]> target) throws NumberFormatException, IOException {
        // 入力読取り
        InputStreamReader streamReader = new InputStreamReader(System.in);
        BufferedReader bufferedReader = new BufferedReader(streamReader);

        String line = null;
        boolean isFirst = true;
        int numberOfDataSet = 0;

        try {
            while ((line = bufferedReader.readLine()) != null) {
                if (isFirst) {
                    numberOfDataSet = Integer.parseInt(line);
                    isFirst = false;
                } else {
                    String[] lengths = line.split(DELIMITER_SPACE);
                    target.add(lengths);
                }
            }
            return numberOfDataSet;
        } finally {
            bufferedReader.close();
            streamReader.close();
        }
    }
} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io import java.util.ArrayList; ArrayList java.util import java.util.Arrays; Arrays java.util import java.util.List; List java.util public class Main {

    /** 区切り文字：スペース */
    private static final String DELIMITER_SPACE = " ";

    /**
     * データセットで与えられた数を3辺とする三角形が直角三角形かを判断する。
     * 
     * @param args
     * @throws IOException
     * @throws NumberFormatException
     */
    public static void main(String[] args) throws NumberFormatException, IOException {

        List<String[]> dataSets = new ArrayList<String[]>();
        int countOfDataSet = getInput(dataSets);

        for (int i = 0; i < countOfDataSet; ++i) {
            System.out.println(getResult(dataSets.get(i)));
        }
    }

    private static String getResult(String[] dataSets) {
        int[] lengths = new int[3];
        toIntArray(3, lengths, dataSets);
        Arrays.sort(lengths);

        if (isRightTriangle(lengths)) {
            return "YES";
        } else {
            return "NO";
        }
    }

    private static boolean isRightTriangle(int[] lengths) {
        if (lengths[2] * lengths[2] == lengths[0] * lengths[0] + lengths[1] * lengths[1]) {
            return true;
        }
        return false;
    }

    private static void toIntArray(int lengthOfArray, int[] intArray, String[] stringArray) {
        for (int i = 0; i < lengthOfArray; ++i) {
            intArray[i] = Integer.parseInt(stringArray[i]);
        }
    }

    private static int getInput(List<String[]> target) throws NumberFormatException, IOException {
        // 入力読取り
        InputStreamReader streamReader = new InputStreamReader(System.in);
        BufferedReader bufferedReader = new BufferedReader(streamReader);

        String line = null;
        boolean isFirst = true;
        int numberOfDataSet = 0;

        try {
            while ((line = bufferedReader.readLine()) != null) {
                if (isFirst) {
                    numberOfDataSet = Integer.parseInt(line);
                    isFirst = false;
                } else {
                    String[] lengths = line.split(DELIMITER_SPACE);
                    target.add(lengths);
                }
            }
            return numberOfDataSet;
        } finally {
            bufferedReader.close();
            streamReader.close();
        }
    }
} Main /** 区切り文字：スペース */
    private static final String DELIMITER_SPACE = " "; DELIMITER_SPACE " " /**
     * データセットで与えられた数を3辺とする三角形が直角三角形かを判断する。
     * 
     * @param args
     * @throws IOException
     * @throws NumberFormatException
     */
    public static void main(String[] args) throws NumberFormatException, IOException {

        List<String[]> dataSets = new ArrayList<String[]>();
        int countOfDataSet = getInput(dataSets);

        for (int i = 0; i < countOfDataSet; ++i) {
            System.out.println(getResult(dataSets.get(i)));
        }
    } main {

        List<String[]> dataSets = new ArrayList<String[]>();
        int countOfDataSet = getInput(dataSets);

        for (int i = 0; i < countOfDataSet; ++i) {
            System.out.println(getResult(dataSets.get(i)));
        }
    } List<String[]> dataSets = new ArrayList<String[]>(); dataSets new ArrayList<String[]>() int countOfDataSet = getInput(dataSets); countOfDataSet getInput(dataSets) getInput dataSets for (int i = 0; i < countOfDataSet; ++i) {
            System.out.println(getResult(dataSets.get(i)));
        } int i = 0; int i = 0; i 0 i < countOfDataSet i countOfDataSet ++i ++i i {
            System.out.println(getResult(dataSets.get(i)));
        } {
            System.out.println(getResult(dataSets.get(i)));
        } System.out.println(getResult(dataSets.get(i))) System.out.println System.out System System.out getResult(dataSets.get(i)) getResult dataSets.get(i) dataSets.get dataSets i String[] args args private static String getResult(String[] dataSets) {
        int[] lengths = new int[3];
        toIntArray(3, lengths, dataSets);
        Arrays.sort(lengths);

        if (isRightTriangle(lengths)) {
            return "YES";
        } else {
            return "NO";
        }
    } getResult {
        int[] lengths = new int[3];
        toIntArray(3, lengths, dataSets);
        Arrays.sort(lengths);

        if (isRightTriangle(lengths)) {
            return "YES";
        } else {
            return "NO";
        }
    } int[] lengths = new int[3]; lengths new int[3] 3 toIntArray(3, lengths, dataSets) toIntArray 3 lengths dataSets Arrays.sort(lengths) Arrays.sort Arrays lengths if (isRightTriangle(lengths)) {
            return "YES";
        } else {
            return "NO";
        } isRightTriangle(lengths) isRightTriangle lengths {
            return "YES";
        } return "YES"; "YES" {
            return "NO";
        } return "NO"; "NO" String[] dataSets dataSets private static boolean isRightTriangle(int[] lengths) {
        if (lengths[2] * lengths[2] == lengths[0] * lengths[0] + lengths[1] * lengths[1]) {
            return true;
        }
        return false;
    } isRightTriangle {
        if (lengths[2] * lengths[2] == lengths[0] * lengths[0] + lengths[1] * lengths[1]) {
            return true;
        }
        return false;
    } if (lengths[2] * lengths[2] == lengths[0] * lengths[0] + lengths[1] * lengths[1]) {
            return true;
        } lengths[2] * lengths[2] == lengths[0] * lengths[0] + lengths[1] * lengths[1] lengths[2] * lengths[2] lengths[2] lengths 2 lengths[2] lengths 2 lengths[0] * lengths[0] + lengths[1] * lengths[1] lengths[0] * lengths[0] lengths[0] lengths 0 lengths[0] lengths 0 lengths[1] * lengths[1] lengths[1] lengths 1 lengths[1] lengths 1 {
            return true;
        } return true; true return false; false int[] lengths lengths private static void toIntArray(int lengthOfArray, int[] intArray, String[] stringArray) {
        for (int i = 0; i < lengthOfArray; ++i) {
            intArray[i] = Integer.parseInt(stringArray[i]);
        }
    } toIntArray {
        for (int i = 0; i < lengthOfArray; ++i) {
            intArray[i] = Integer.parseInt(stringArray[i]);
        }
    } for (int i = 0; i < lengthOfArray; ++i) {
            intArray[i] = Integer.parseInt(stringArray[i]);
        } int i = 0; int i = 0; i 0 i < lengthOfArray i lengthOfArray ++i ++i i {
            intArray[i] = Integer.parseInt(stringArray[i]);
        } {
            intArray[i] = Integer.parseInt(stringArray[i]);
        } intArray[i] = Integer.parseInt(stringArray[i]) intArray[i] intArray i Integer.parseInt(stringArray[i]) Integer.parseInt Integer stringArray[i] stringArray i int lengthOfArray lengthOfArray int[] intArray intArray String[] stringArray stringArray private static int getInput(List<String[]> target) throws NumberFormatException, IOException {
        // 入力読取り
        InputStreamReader streamReader = new InputStreamReader(System.in);
        BufferedReader bufferedReader = new BufferedReader(streamReader);

        String line = null;
        boolean isFirst = true;
        int numberOfDataSet = 0;

        try {
            while ((line = bufferedReader.readLine()) != null) {
                if (isFirst) {
                    numberOfDataSet = Integer.parseInt(line);
                    isFirst = false;
                } else {
                    String[] lengths = line.split(DELIMITER_SPACE);
                    target.add(lengths);
                }
            }
            return numberOfDataSet;
        } finally {
            bufferedReader.close();
            streamReader.close();
        }
    } getInput {
        // 入力読取り
        InputStreamReader streamReader = new InputStreamReader(System.in);
        BufferedReader bufferedReader = new BufferedReader(streamReader);

        String line = null;
        boolean isFirst = true;
        int numberOfDataSet = 0;

        try {
            while ((line = bufferedReader.readLine()) != null) {
                if (isFirst) {
                    numberOfDataSet = Integer.parseInt(line);
                    isFirst = false;
                } else {
                    String[] lengths = line.split(DELIMITER_SPACE);
                    target.add(lengths);
                }
            }
            return numberOfDataSet;
        } finally {
            bufferedReader.close();
            streamReader.close();
        }
    } InputStreamReader streamReader = new InputStreamReader(System.in); streamReader new InputStreamReader(System.in) BufferedReader bufferedReader = new BufferedReader(streamReader); bufferedReader new BufferedReader(streamReader) String line = null; line null boolean isFirst = true; isFirst true int numberOfDataSet = 0; numberOfDataSet 0 try {
            while ((line = bufferedReader.readLine()) != null) {
                if (isFirst) {
                    numberOfDataSet = Integer.parseInt(line);
                    isFirst = false;
                } else {
                    String[] lengths = line.split(DELIMITER_SPACE);
                    target.add(lengths);
                }
            }
            return numberOfDataSet;
        } finally {
            bufferedReader.close();
            streamReader.close();
        } {
            bufferedReader.close();
            streamReader.close();
        } bufferedReader.close() bufferedReader.close bufferedReader streamReader.close() streamReader.close streamReader {
            while ((line = bufferedReader.readLine()) != null) {
                if (isFirst) {
                    numberOfDataSet = Integer.parseInt(line);
                    isFirst = false;
                } else {
                    String[] lengths = line.split(DELIMITER_SPACE);
                    target.add(lengths);
                }
            }
            return numberOfDataSet;
        } while ((line = bufferedReader.readLine()) != null) {
                if (isFirst) {
                    numberOfDataSet = Integer.parseInt(line);
                    isFirst = false;
                } else {
                    String[] lengths = line.split(DELIMITER_SPACE);
                    target.add(lengths);
                }
            } (line = bufferedReader.readLine()) != null (line = bufferedReader.readLine()) line bufferedReader.readLine() bufferedReader.readLine bufferedReader null {
                if (isFirst) {
                    numberOfDataSet = Integer.parseInt(line);
                    isFirst = false;
                } else {
                    String[] lengths = line.split(DELIMITER_SPACE);
                    target.add(lengths);
                }
            } if (isFirst) {
                    numberOfDataSet = Integer.parseInt(line);
                    isFirst = false;
                } else {
                    String[] lengths = line.split(DELIMITER_SPACE);
                    target.add(lengths);
                } isFirst {
                    numberOfDataSet = Integer.parseInt(line);
                    isFirst = false;
                } numberOfDataSet = Integer.parseInt(line) numberOfDataSet Integer.parseInt(line) Integer.parseInt Integer line isFirst = false isFirst false {
                    String[] lengths = line.split(DELIMITER_SPACE);
                    target.add(lengths);
                } String[] lengths = line.split(DELIMITER_SPACE); lengths line.split(DELIMITER_SPACE) line.split line DELIMITER_SPACE target.add(lengths) target.add target lengths return numberOfDataSet; numberOfDataSet List<String[]> target target public class Main {

    /** 区切り文字：スペース */
    private static final String DELIMITER_SPACE = " ";

    /**
     * データセットで与えられた数を3辺とする三角形が直角三角形かを判断する。
     * 
     * @param args
     * @throws IOException
     * @throws NumberFormatException
     */
    public static void main(String[] args) throws NumberFormatException, IOException {

        List<String[]> dataSets = new ArrayList<String[]>();
        int countOfDataSet = getInput(dataSets);

        for (int i = 0; i < countOfDataSet; ++i) {
            System.out.println(getResult(dataSets.get(i)));
        }
    }

    private static String getResult(String[] dataSets) {
        int[] lengths = new int[3];
        toIntArray(3, lengths, dataSets);
        Arrays.sort(lengths);

        if (isRightTriangle(lengths)) {
            return "YES";
        } else {
            return "NO";
        }
    }

    private static boolean isRightTriangle(int[] lengths) {
        if (lengths[2] * lengths[2] == lengths[0] * lengths[0] + lengths[1] * lengths[1]) {
            return true;
        }
        return false;
    }

    private static void toIntArray(int lengthOfArray, int[] intArray, String[] stringArray) {
        for (int i = 0; i < lengthOfArray; ++i) {
            intArray[i] = Integer.parseInt(stringArray[i]);
        }
    }

    private static int getInput(List<String[]> target) throws NumberFormatException, IOException {
        // 入力読取り
        InputStreamReader streamReader = new InputStreamReader(System.in);
        BufferedReader bufferedReader = new BufferedReader(streamReader);

        String line = null;
        boolean isFirst = true;
        int numberOfDataSet = 0;

        try {
            while ((line = bufferedReader.readLine()) != null) {
                if (isFirst) {
                    numberOfDataSet = Integer.parseInt(line);
                    isFirst = false;
                } else {
                    String[] lengths = line.split(DELIMITER_SPACE);
                    target.add(lengths);
                }
            }
            return numberOfDataSet;
        } finally {
            bufferedReader.close();
            streamReader.close();
        }
    }
} public class Main {

    /** 区切り文字：スペース */
    private static final String DELIMITER_SPACE = " ";

    /**
     * データセットで与えられた数を3辺とする三角形が直角三角形かを判断する。
     * 
     * @param args
     * @throws IOException
     * @throws NumberFormatException
     */
    public static void main(String[] args) throws NumberFormatException, IOException {

        List<String[]> dataSets = new ArrayList<String[]>();
        int countOfDataSet = getInput(dataSets);

        for (int i = 0; i < countOfDataSet; ++i) {
            System.out.println(getResult(dataSets.get(i)));
        }
    }

    private static String getResult(String[] dataSets) {
        int[] lengths = new int[3];
        toIntArray(3, lengths, dataSets);
        Arrays.sort(lengths);

        if (isRightTriangle(lengths)) {
            return "YES";
        } else {
            return "NO";
        }
    }

    private static boolean isRightTriangle(int[] lengths) {
        if (lengths[2] * lengths[2] == lengths[0] * lengths[0] + lengths[1] * lengths[1]) {
            return true;
        }
        return false;
    }

    private static void toIntArray(int lengthOfArray, int[] intArray, String[] stringArray) {
        for (int i = 0; i < lengthOfArray; ++i) {
            intArray[i] = Integer.parseInt(stringArray[i]);
        }
    }

    private static int getInput(List<String[]> target) throws NumberFormatException, IOException {
        // 入力読取り
        InputStreamReader streamReader = new InputStreamReader(System.in);
        BufferedReader bufferedReader = new BufferedReader(streamReader);

        String line = null;
        boolean isFirst = true;
        int numberOfDataSet = 0;

        try {
            while ((line = bufferedReader.readLine()) != null) {
                if (isFirst) {
                    numberOfDataSet = Integer.parseInt(line);
                    isFirst = false;
                } else {
                    String[] lengths = line.split(DELIMITER_SPACE);
                    target.add(lengths);
                }
            }
            return numberOfDataSet;
        } finally {
            bufferedReader.close();
            streamReader.close();
        }
    }
} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

/**
 * 0003：Is it a Right Triangle?
 * 
 * @author Lyu
 * @version 2015/07/12
 */
public class Main {

    /** 区切り文字：スペース */
    private static final String DELIMITER_SPACE = " ";

    /**
     * データセットで与えられた数を3辺とする三角形が直角三角形かを判断する。
     * 
     * @param args
     * @throws IOException
     * @throws NumberFormatException
     */
    public static void main(String[] args) throws NumberFormatException, IOException {

        List<String[]> dataSets = new ArrayList<String[]>();
        int countOfDataSet = getInput(dataSets);

        for (int i = 0; i < countOfDataSet; ++i) {
            System.out.println(getResult(dataSets.get(i)));
        }
    }

    private static String getResult(String[] dataSets) {
        int[] lengths = new int[3];
        toIntArray(3, lengths, dataSets);
        Arrays.sort(lengths);

        if (isRightTriangle(lengths)) {
            return "YES";
        } else {
            return "NO";
        }
    }

    private static boolean isRightTriangle(int[] lengths) {
        if (lengths[2] * lengths[2] == lengths[0] * lengths[0] + lengths[1] * lengths[1]) {
            return true;
        }
        return false;
    }

    private static void toIntArray(int lengthOfArray, int[] intArray, String[] stringArray) {
        for (int i = 0; i < lengthOfArray; ++i) {
            intArray[i] = Integer.parseInt(stringArray[i]);
        }
    }

    private static int getInput(List<String[]> target) throws NumberFormatException, IOException {
        // 入力読取り
        InputStreamReader streamReader = new InputStreamReader(System.in);
        BufferedReader bufferedReader = new BufferedReader(streamReader);

        String line = null;
        boolean isFirst = true;
        int numberOfDataSet = 0;

        try {
            while ((line = bufferedReader.readLine()) != null) {
                if (isFirst) {
                    numberOfDataSet = Integer.parseInt(line);
                    isFirst = false;
                } else {
                    String[] lengths = line.split(DELIMITER_SPACE);
                    target.add(lengths);
                }
            }
            return numberOfDataSet;
        } finally {
            bufferedReader.close();
            streamReader.close();
        }
    }
}