#include <iostream> 
using namespace std;
//Divisors of the Natural Number n
int main() {
	cout << "Divisors of n \n";
	cout << "To exit: n < 1 \n\n";
	while (true) {
		int n;
	    cout << "n = "; 
	    cin >> n;
	    if (n<1) {
	    	cout << "The program is terminated. Bye!";
	    	break;
		}
	    for (int i=1; i<n+1; i++) {
	    	if (n % i == 0) {
	    		cout << i << endl;
			}
		}
		cout << endl;
	}
    return 0;
}

