#include <bits/stdc++.h>
using namespace std;
using ll = long long;

int main(){
    ios::sync_with_stdio(false);
    cin.tie(0);
    int n;
    cin >> n;
    for(int i = 1; i * i <= n; i++){
        for(int j = i; i * i + j * j <= n; j++){
            if(i * i + j * j == n){
                cout << "Yes\n";
                return 0;
            }
        }
    }
    cout << "No\n";
}