You are on page 1of 1

#include <fstream>

using namespace std;

int main()
{ ifstream g("date.in");
ofstream h("date.out");
int n,f=2,nr=0;
while(g>>n){
while(n>1){
if(n%f==0)
nr++;
while(n%f==0)
n=n/f;
f++;
if(nr==2)
h<<n<<' ';
}
}
g.close();h.close();
return 0;
}

You might also like