#include <iostream>  // PRIME_mult.cpp DANILIN
#include <cmath> // rextester.com/YDXE69472
using namespace std; int main() 
{ setlocale (LC_ALL, "RUS"); srand(time(NULL));
  int i; int f=0,j=2,q=0; double p,s; p=0; // long p = 2147483648-1;
  for (i=0;i<9;i++) p=p+pow(10., i)*(rand()%10); 
  s = int (pow(p, 0.5));
  cout << int(p) <<" "<< s << endl;
while (f < 1)
{ if (j >= s) { f=2; }
  if (int (p) % int (j) == 0) 
  { q=1; cout << int(p) <<" "<<j<<" "<< int(p/j) <<endl;}
  j++;
}
if (q != 1) { cout <<"Prime "<< p << endl; }
system("pause");
}
