/*-- ILSH  --*/
#include "bits/stdc++.h"
using namespace std;
typedef long long ll;
typedef long double ld;
#define pb push_back 
#define pop pop_back
#define mp make_pair
#define vii vector < ll >
#define vll vector < ll > 
#define dt cout<<"HERE\n";
#define pii pair < ll , ll >
#define pll pair < ll , ll >
#define vpi vector < pii >
#define vpl vector < pll >
#define fi first
#define se second 
#define sz size 
#define len length 
const ll inf=1e18+1e17;
const ll moda =29;
const ll modb =34483;
//const ll mod = 998244353;

ll modInverse(ll a,ll m){ll m0=m;ll y=0,x=1;if(m == 1)return 0;while(a> 1){ll q=a/m;ll t=m;m=a%m,a=t;t=y;y=x-q*y;x=t;}if(x<0)x+=m0;return x;}  
/*ll powm(ll a,ll b){a=a%mod;ll res=1;while(b){if(b&1)res=(res*a)%mod;a=(a*a)%mod;b>>=1;}return (res%mod);}*/
const ll N =1e6+6;
int arr[N];
void solve(){
	int n;
	cin>>n;
	memset( arr,0,sizeof ( arr));
	bool va=0;
	int gc=0;
	for ( int i=0;i<n;i++){
		int xx;
		cin>>xx;
		if ( gc==0)
			gc=xx;
		else
			gc=__gcd( gc,xx);
		/*if ( arr[xx])
			va=1;*/
		arr[xx]=1;
	}
	for ( int i=2;i<N;i++){
		int cnt=0;
		for ( int j=i;j<N;j+=i)
			cnt+=arr[j];
		if ( cnt>=2)
			va=1;
	}
	if ( n> 79000){
		va=1;
	}
	if ( va){
		if ( gc==1)
			cout<<"setwise coprime\n";
		else
			cout<<"not coprime\n";
	}
	else
		cout<<"pairwise coprime\n";

}
int main(){
	ios_base::sync_with_stdio(false);
	cin.tie( NULL);
	cout.tie(NULL);

	#ifndef ONLINE_JUDGE
		freopen ("INPUT.txt" , "r" , stdin);
		freopen ("OUTPUT.txt", "w" , stdout);
	#endif
	
	ll t=1;
	//cin>>t;
	for ( ll i=1;i<=t;i++){
		//cout<<"Case #"<<i<<": ";
    	solve();
    }
}