#include<bits/stdc++.h>
using namespace std;
long long visit[10000010]={0};
main()
{
long long i,j;
visit[1]=1;
for(i=4;i<=10000000;i=i+2)
{
visit[i]=1;
}
for(i=3;i<=sqrt(10000000);i++)
{
if(visit[i]==0)
for(j=i*i;j<=10000000;j=j+i)
{
visit[j]=1;
}
}
long long n;
while(cin>>n)
{
long long rmn,i1;
if(n<8)
{
cout<<"Impossible.";
}
else
{
if(n%2==0)
{
cout<<"2 2 ";
rmn=n-4;
}
else
{
cout<<"2 3 ";
rmn=n-5;
}
for(i1=2;i1<=rmn;i1++)
{
if(visit[i1]==0&&visit[rmn-i1]==0)
{
cout<<i1<<" "<<rmn-i1;
flag=1;
break;
}
}
if(flag==0)
{
cout<<"Impossible.";
}
}
cout<<endl;
}
}
using namespace std;
long long visit[10000010]={0};
main()
{
long long i,j;
visit[1]=1;
for(i=4;i<=10000000;i=i+2)
{
visit[i]=1;
}
for(i=3;i<=sqrt(10000000);i++)
{
if(visit[i]==0)
for(j=i*i;j<=10000000;j=j+i)
{
visit[j]=1;
}
}
long long n;
while(cin>>n)
{
long long rmn,i1;
if(n<8)
{
cout<<"Impossible.";
}
else
{
if(n%2==0)
{
cout<<"2 2 ";
rmn=n-4;
}
else
{
cout<<"2 3 ";
rmn=n-5;
}
for(i1=2;i1<=rmn;i1++)
{
if(visit[i1]==0&&visit[rmn-i1]==0)
{
cout<<i1<<" "<<rmn-i1;
flag=1;
break;
}
}
if(flag==0)
{
cout<<"Impossible.";
}
}
cout<<endl;
}
}
কোন মন্তব্য নেই:
একটি মন্তব্য পোস্ট করুন