#include <bits/stdc++.h>
using namespace std;
int main() {
  int a;
  string B;
  cin >> a >> B;
  a *= pow(10, B.size());
  for (int i = B.size() - 1; i >= 0; i--) {
    a += (B[i] - '0') * pow(10, i);
  }
  cout << (a == sqrt(a) * sqrt(a) ? "Yes" : "No") << endl;
  return 0;
}
