#include<bits/stdc++.h>
using namespace std;
int a,b;
int m(int x,int y){
int t;
t=x*y;
return t;
}
int fa1(int x){
int a,b,c;
a = b = c = x;
int s1;
s1=m(a,b);
int s2;
s2=m(s1,c);
int res;
res=s2;
return res;
}
bool cmp(int x,int y){
bool f;
if(x=y){//要用==
f=true;
}
else{
f=false;
}
return f;
}
bool check(int x){
int a;
a=fa1(x);
bool d;
d=cmp(a,b);
bool f1;
if(d=true){//要用==
f1=true;
}else{
f1=false;
}
if(f1!=false){
return true;
}else{
return false;
}
}
string get1(){
string s;
char c1,c2,c3;
c1='Y';
c2='e';
c3='s';
s.push_back(c1);
s.push_back(c2);
s.push_back(c3);
return s;
}
string get2(){
string s;
char c1,c2;
c1='N';
c2='o';
s.push_back(c1);
s.push_back(c2);
return s;
}
void c1(){
string o;
o=get1();
cout<<o;
}
void c2(){
string o;
o=get2();
cout<<o;
}
bool fa(int x){
queue<int> q;
for(int i=1;i<=x;i++){
q.push(i);
}
bool flag;
flag=false;
while(!q.empty()){
int i;
i=q.front();
q.pop();
bool t;
t=check(i);
if(t=true){//要用==
flag=true;
break;
}
}
bool t;
if(flag=true){//要用==
t=true;
}
else{
t=false;
}
return t;
}
int main(){
ios::sync_with_stdio(false);
cin.tie(0);cout.tie(0);
int t;
cin>>t;
a=t;
b=a;
bool ans;
ans=fa(b);
if(ans==true){
c1();
}
else{
c2();
}
return 0;
}