#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define all(x) (x).begin(), (x).end()
#define Ye cout<<"Yes"<<endl
#define YE cout<<"YES"<<endl
#define No cout<<"No"<<endl
#define NO cout<<"NO"<<endl
using namespace std;
using ll=long long;
int main(void){
    ll P,bol=0;
    cin>>P;
    rep(i,1000){
        rep(j,1000){
            if((i+1)*(i+1)+(j+1)*(j+1)==P){
                bol++;
                break;
            }
        }
        if(bol==1)break;
    }
    if(bol==1)Ye;
    else No;
}