#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
#include <math.h>
bool check(int x) {
int y = pow(x, 2);
int t = y, digits = 0;
while (t) {
t /= 10;
++digits;
}
for (int i = 1; i <= digits; ++i)
if (y % (int) pow(10, i) == x) return true;
return false;
}
int main(int argc, char const *argv[]) {
int n;
while (~scanf("%d", &n))
puts(check(n) ? "Yes!" : "No!");
return 0;
}