#include <bits/stdc++.h>
using namespace std;
int binarySearch(int arr[], int l, int r, int x) {
  while (l <= r) {
    int m = l + (r - l) / 2;
    if (arr[m] == x) return m;
    if (arr[m] < x)
      l = m + 1;
    else
      r = m - 1;
  }
  return -1;
}
bool sortbysec(const pair<string, int> &a, const pair<string, int> &b) {
  return (a.second > b.second);
}
int main() {
  std::ios_base::sync_with_stdio(0);
  cin.tie(NULL);
  cout.tie(NULL);
  int a, b;
  cin >> a >> b;
  int char = 0, n = b;
  while (b) {
    b /= 10;
    char ++;
  }
  while (a) {
    n += ((a % 10) * pow(10, char));
    char ++;
    a /= 10;
  }
  int x = sqrt(n);
  if (x * x == n)
    cout << "Yes" << endl;
  else
    cout << "No" << endl;
  return 0;
}
