#include<stdio.h>

#include<math.h>

int main()

{
    int a,b,i,s1,s2;

    while(scanf("%d %d",&a,&b)==2){

            if(a<1 || b>100){

                break;
            }

    else if(a==1 || b==1){

        printf("Yes\n");

        break;

    }


    s1=sqrt(a);

    s2=sqrt(b);

    if(s1==b || s2==a){

        printf("Yes\n");

        break;
    }

    else{

         printf("No\n");

         break;
    }

    }

    return 0;

}
