#include <iostream> int primes[79000]; int len; void getprimes() { bool flag[1000005] = {0}; for (int i = 2; i <= 1002;++i) for (int j = 2*i;j <= 1000001;j += i) if (!flag[i]) flag[j] = true; len = 0; for (int i = 2; i <= 1000000;++i) if (!flag[i]) primes[len++] = i; } int main(void) { long long n; getprimes(); while (scanf("%lld",&n),n > 0) { for (int i = 0; primes[i] * primes[i] <= n && i < len;++i) { while (n % primes[i] == 0) { printf(" %d/n",primes[i]); n /= primes[i]; } } if (n > 1) printf(" %lld/n",n); printf("/n"); } return 0; }