#include #include using namespace std; int main(){ int P; cin >> P; for (int i = 1;i <= P;i++){ for (int j = 1;j <= P;j++){ if (pow(i,i) + pow(j,j) == P){ cout << "Yes" << endl; return 0;; } } } cout << "No" << endl; return 0; }