#include
#include
#include
#include
#include
using namespace std;
vector
set
void pt(int a,int b)
{
for(int i=a;i<=b;i++)
{
if(i!=2&&i%2==0) continue;
for(int j=3;j*j<=i;j+=2)
{
if(i%j==0) goto RL;
}
v.push_back(i);
RL:continue;
}
}
int main()
{
//ifstream cin("acmilan.txt");
pt(2,500000); www.2cto.com
for(i=0;i
for(j=0;j
p=v[i]*v[j];
if(p<1000000)
s.insert(p);
else
break;
}
}
int n;
set
while(cin>>n)
{
it=s.find(n);
if(it!=s.end())
cout<<"Yes"<
cout<<"No"<
//system("pause");
return 0;
}
作者:teibin