// Solution of Quiz 2
#include <iostream>
using namespace std;
int divisors(int n);
int main()
{
	int n, d;
	cout << "Enter a positive integer: ";
	cin >> n;
	if (n < 2)
		cout << n << " is invalid.\n";
	else
	{
		d = divisors(n);
		if (d == 0)
			cout << n << " has no nontrivial divisors.\n";
		else
				cout << n << " has " << d << " 
nontrivial divisors.\n";
	}
	return 0;
}

int divisors(int n)
{
	if (n < 2)
		return -1;
	else
	{
		int count = 0;
		for (int i = 2; i < n; i++)
			if (n % i == 0)
				count++;
		return count;
	}
}
