Var
a, b: real;
begin
//readln(a, b);
assign(input, 'input.txt');
reset(input);
read(input, a, b);
close(input);
assign(output, 'output.txt');
rewrite(output);
if ((sqr(a) = b) or (sqrt(b) = a)) then
writeln(output, 'YES')
else
writeln(output, 'NO');
end.