#pragma GCC target ("avx2")
#pragma GCC optimization ("O3")
#pragma GCC optimization ("unroll-loops")
#include <bits/stdc++.h>
 
using namespace std;
 
long long cnt[1000001];
 
int main()
{
	ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
	int n,x,mx=-100000,mn=100000;
	cin >> n;
	int g=0;
	for ( int i = 0; i < n; i++ ) {
		cin >> x;
		g=__gcd(x,g);
		mn = min(mn, x);
		mx = max(mx, x);
		cnt[x]++;
	}
	long long ans = 0;
	for ( int i = max(mn,2); i <= mx; i++ ) {
		ans += (cnt[i]*(cnt[i]-1))/2;
		for ( int j = i+1; j <= mx; j++ ) {
			if ( __gcd(i,j) > 1 ) {
				ans += cnt[i]*cnt[j];
			}
		}
	}
	if(ans==0){
		cout<<"pairwise coprime";
	}
	else if(g==1){
		cout<<"setwise coprime";
	}
	else{
		cout<<"not coprime";
	}
	return 0;
}