#include<stdio.h>
#include<math.h>
int main()
{
//freopen("in.txt","r",stdin);
//freopen("out.txt","w",stdout);
int x,y,l1,l2;
bool flag1,flag2;
while(scanf("%d%d",&x,&y)!=EOF)
{
flag1=false; flag2=false;
if((x%4==1&&y%4==1)||(x%4==3&&y%4==3))
{
printf("yes/n");
continue;
}
if(x%4!=1&&x%4!=3&&y%4!=1&&y%4!=3)
{
l1=(int)sqrt(x-1);
l2=(int)sqrt(y-1);
if((l1+1)%2==0)
{
x=x-l1*l1;
if((x-1)%4==0) flag1=true;
}
if((l2+1)%2==0)
{
y=y-l2*l2;
if((y-1)%4==0) flag2=true;
}
if((l1+1)%2==1)
{
x=x-l1*l1;
if(x%4==0) flag1=true;
}
if((l2+1)%2==1)
{
y=y-l2*l2;
if(y%4==0) flag2=true;
}
if((flag1&&flag2)||(!flag1&&!flag2)) printf("yes/n");
else printf("no/n");
}
else printf("no/n");
}
return 0;
}