 #include <bits/stdc++.h>
using namespace std;

int main()
{
	int N;
	cin >> N;
	vector<int> A( N );
	for( int i = 0; i < N; i++ ) {
		cin >> A[i];
	}

	string ans = "not coprime";
	vector<int> acc( N + 1 );
	int a = __gcd( A[0], A[1] );
	for( int i = 2; i < N; i++ ) {
		a = __gcd( a, A[i] );
	}
	if( a == 1 ) {
		ans = "setwise coprime";
		int flag = 0;
		for( int i = 1; i < N - 1; i++ ) {
			if( __gcd( A[i], A[i + 1] ) != 1 ) {
				flag = 1;
				break;
			}
		}
		if( flag == 0 ) ans = "pairwise coprime";
	}

	cout << ans << endl;
}
