#include <bits/stdc++.h>
using namespace std;
#define ll long long int
#define mod 1000000007
#define pb push_back
#define ff first 
#define ss second  
typedef pair<int,int> pp;
bool com(pp x,pp y){
    return x.ff<y.ff;
} 
int N=1e6+9; 
vector<int> dp(N,N);
void solve(){
    dp[1]=1;
    for(int i=2;i<N;i++){
        if(dp[i]<i) continue;
        for(int j=i;j<N;j+=i) dp[j]=min(dp[j],i);
    }
}
int main() {
	// your code goes here
	ios_base::sync_with_stdio(false);
	cin.tie(0);
	cout.tie(0); 
	solve();
	int n;
	cin>>n;
	int a[n];
	int gcd,flag=1;
	map<int,int> mp1,mp2;
	for(int i=0;i<n;i++) cin>>a[i],mp1[a[i]]++;
	gcd=__gcd(a[0],a[1]);
	for(int i=0;i<n;i++){
	    int k=a[i];
	    gcd=__gcd(a[i],gcd);
	    if(mp1[k]>1&&k!=1) flag=0;
	    //bitset<1000007> vis;
	    while(k>1){
	        if(mp2[dp[k]]) flag=0;
	        mp2[dp[k]]++;
	        int x=dp[k];
	        //cout<<dp[k]<<"\n";
	        k/=x;
	        while(k%x==0&&k>1) k/=x;
	    }
	    //if(!flag) break;
	}
	if(flag) cout<<"pairwise coprime";
	else if(gcd==1) cout<<"setwise coprime";
	else cout<<"not coprime";
	return 0; 
	
}
