#include <bits/stdc++.h>
using namespace std;
string a, b;
int main() {
  cin >> a >> b;
  int i, j, num = 0;
  for (i = 0; i < a.size(); i++) num = num * 10 + (a[i] - 48);
  for (i = 0; i < b.size(); i++) num = num * 10 + (b[i] - 48);
  if (sqrt(num) == int(sqrt(num)))
    cout << "Yes" << endl;
  else
    cout << "No" << endl;
  return 0;
}
