#include using namespace std; int main() { while (cin) { int n; cin >> n; if (n == 0) break; int primes[10]; for (int i=0;i> primes[i]; } 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 (xxx % primes[j] == 0) xxx /= primes[j]; } if (xxx != 1) continue; if (neco) cout << ','; cout << i; neco = true; } if (!neco) cout << "none"; cout << endl; } return 0; }