#include #include using namespace std; #define VEL 1024*1000*40 int poile[VEL]; int main() { while (cin) { int n; cin >> n; if (n == 0) break; int primes[10]; for (int i=0;i> primes[i]; } memset(poile, 0, VEL); int min, max; cin >> min >> max; bool neco = false; for (int i = min; i <= max; i++) { int xxx = i; for (int j = 0; j < n; j++) { while (1) { if (xxx < VEL && poile[xxx] != 0) { if (poile[xxx] == 1) goto sem; else goto tam; } else if (xxx % primes[j] == 0) { xxx /= primes[j]; } else break; } } if (i < VEL) poile[i] = -1; tam: if (xxx != 1) continue; if (i < VEL) poile[i] = 1; sem: if (neco) cout << ','; cout << i; neco = true; } if (!neco) cout << "none"; cout << endl; } return 0; }