#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b, s = 0;
  cin >> a >> b;
  while (b != 0) {
    s = s * 10 + b % 10;
    b = b / 10;
  }
  b = s;
  if (b == 0) a *= 10;
  while (b != 0) {
    a = a * 10 + b % 10;
    b = b / 10;
  }
  if (sqrt(a) * sqrt(a) == a)
    cout << "Yes" << endl;
  else
    cout << "No" << endl;
  return 0;
}
