A Pythagorean triple (A, B, C) is defined as three positive integers that satisfy the Pythagorean Theorem: A2 + B2 = C2. Given two positive integers A and B, your task is to verify whether they are the "legs" in a Pythagorean triple, i.e. if an integer C exists such that (A, B, C) is a Pythagorean triple.
Input
The first line will contain a single integer N (0 < N <= 10000). Each of the next N lines will contain two integers A and B (0 < A, B <= 100).
Output
For each test case, output a single line. If a valid C exists, output a line containing the word YES and the value of C, separated by a space. Otherwise, output the single word NO.
Example
This isn't a homework service. Try to solve it yourself first. If you're stuck with a specific thing, show us your code and tell us what's giving you trouble, and we'll help you through it.