	#include<bits/stdc++.h>
	using namespace std;
	#define int long long int
	#define pb push_back
	const int mod=1e9+7;
	#define all(x) x.begin(),x.end()
	#define endl '\n'
	#define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0)
	int num = 1e6+10;
	vector<int>prime;
	void sieve(){
		bool pr[num+1]; 
    memset(pr, true, sizeof(pr)); 
  
    for (int p=2; p*p<=num; p++) 
    { 
        if (pr[p] == true) 
        { 
            for (int i=p*p; i<=num; i += p) 
                pr[i] = false; 
        } 
    } 
	for (int p=2; p<=num; p++) 
       if (pr[p]) 
          prime.pb(p); 
	}
	int32_t main(){
		IOS;
		int n;
		cin>>n;
		int gcd =0;
		vector<int>v;
		sieve();
		//cout<<prime.size()<<endl;
		for(int i=0;i<n;i++){
			int a;
			cin>>a;
			v.pb(a);
			gcd=__gcd(a,gcd);
		}
		int maxi = *max_element(v.begin(),v.end());
		vector<bool>vis(maxi+1,0);
		bool f=1;
		for(int j=0;j<n;j++){
			for(int i=0;i<prime.size() and prime[i]<=v[j];i++){
				if(v[j]%prime[i]==0){
					if(vis[prime[i]]==1){
						f=0;
						break;
					}
					else vis[prime[i]]=1;
				}
			}
		}
		if(f){
			cout<<"pairwise coprime"<<endl;
		}
		else if(f==0 and gcd==1){
			cout<<"setwise coprime"<<endl;
		}
		else cout<<"not coprime"<<endl;
		return 0;
	}
