http://acm.hit.edu.cn/hoj/problem/view?id=2567
#include <stdio.h>
int main()
{
int cases, n, x, y;
scanf("%d", &cases);
while (cases--)
{
scanf("%d %d %d", &n, &x, &y);
if ( (x * x - n * y *y) == 1)
printf("yes\n");
else
printf("no\n");
}
return 0;
}