#include<bits/stdc++.h>
#define REPP(i,n,m) for(int i=n;i<=m;i++)
#define REPM(i,n,m) for(int i=n;i>=m;i--)
using namespace std;
void yn(bool f){if(f){cout<<"Yes\n";}else{cout<<"No\n";}}
bool isnum(char c){return ('0'<=c&&c<='9');}

int main(){
	int p;
	int j;
	cin>>p;
	if(p%4==3){
		cout<<"No";
	}
	else{
		for(int i=1;i<=pow(p,0.5);i++){
			j=pow(p-i*i,0.5)+0.5;
			if(i*i+j*j==p){
				cout<<"Yes";
				break;
			}
		}
	}
	
	
}