#pragma GCC optimize(2)
#pragma G++ optimize(2)
#include<bits/stdc++.h>
#define si(a) scanf("%d",&a)
#define sl(a) scanf("%lld",&a)
#define sd(a) scanf("%lf",&a)
#define ss(a) scanf("%s",a)
#define ms(a) memset(a,0,sizeof(a))
#define repi(i,a,b) for(register int i=a;i<=b;++i)
#define repd(i,a,b) for(register int i=a;i>=b;--i)
#define reps(s) for(int i=head[s],v=e[i].to;i;i=e[i].nxt,v=e[i].to)
#define ce(i,r) i==r?'\n':' '
#define pb push_back 
#define all(x) x.begin(),x.end()
#define fi first
#define se second
#define pr(x) cout<<#x<<": "<<x<<endl

using namespace std;
typedef long long ll;
const int MAX_N=1e6+5;
ll mul(ll a,ll b,ll mod)
{
    ll res=0; a%=mod,b%=mod; 
    while(b){
        if(b&1){ res+=a; if(res>=mod) res-=mod; }
        b>>=1,a<<=1; if(a>=mod)  a-=mod;
    }
    return res;
}
ll qpow(ll x,ll n,ll mod){ ll res=1;while(n){ if(n&1) res=mul(res,x,mod); x=mul(x,x,mod),n>>=1; } return res; }
bool check(ll a,ll n){
    ll x=n-1,y; int t=0;
    while((x&1)==0) x>>=1,t++;
    x=qpow(a,x,n);
    repi(i,1,t){
        y=mul(x,x,n);
        if(y==1&&x!=1&&x!=n-1) return true;
        x=y;
    }
    return y!=1?true:false;
}
int arr[5]={2,3,7,61,24251};
bool Miller_Robin(ll x)//¸´ÔÓ¶Èklog(n) kÎªÅÐ¶¨´ÎÊý£¬´Ë´¦Îª12
{
    if(x==46856248255981ll||x<2)return false;
    if(x==2||x==3||x==7||x==61||x==24251)return true;
    if(!(x&1)||!(x%3)||!(x%61)||!(x%24251))return false;
    repi(i,0,4){
        if(arr[i]>=x) break;
        if(check(arr[i],x)) return false;
    }
    return true;
}

struct PollardRho
{
    #define Rand(x) (1ll*rand()*rand()*rand()*rand()%(x)+1)
    #define abs(x) ((x)<0?-(x):(x))
    ll ans;
    ll Qmul(ll x,ll y,ll X)
	{
	    ll k=(ll)((1.0L*x*y)/(1.0L*X)),t=x*y-k*X;
	    t-=X;while(t<0) t+=X;return t;
	}
    ll Work(ll x,int y)
    {
        int t=0,k=1;ll v0=Rand(x-1),v=v0,d,s=1;while(true)
        {
            if(v=(Qmul(v,v,x)+y)%x,s=Qmul(s,abs(v-v0),x),!(v^v0)||!s) return x;
            if(++t==k) {if((d=__gcd(s,x))^1) return d;v0=v,k<<=1;}
        }
    }
    void Resolve_Mx(ll x,int t)
    {
        if(!(x^1)||x<=ans) return;if(Miller_Robin(x)){ ans=max(ans,x);return; } 
        ll y=x;while((y=Work(x,t--))==x);while(!(x%y)) x/=y;Resolve_Mx(x,t),Resolve_Mx(y,t);
    }
    void Resolve(ll x,int t)
    {
    	if(!(x^1)) return;if(Miller_Robin(x)){ mp[x]++;return; } 
        ll y=x;while((y=Work(x,t--))==x);while(!(x%y)) x/=y;Resolve(x,t),Resolve(y,t);
	}
    PollardRho() {srand(time(0));}
    ll GetMax(ll x) {return ans=0,Resolve_Mx(x,302627441),ans;}
    vector<int> divi; 
	map<ll,int> mp;
	void Prime_Factorization(ll x)
	{
		divi.clear(),mp.clear();
		if(x==1) {  return ; }
		Resolve(x,302627441);
		for(auto x:mp) divi.pb(x.fi);
	}
}PR;
int a[MAX_N],cnt[MAX_N];
int main()
{
	ms(cnt);
	int n; si(n);
	repi(i,1,n) si(a[i]);
	repi(t,1,n){
		int x=a[t];
		PR.Prime_Factorization(x);
		for(auto x:PR.divi) cnt[x]++;
	} 
	int mx=0;
	repi(i,2,MAX_N-1) mx=max(mx,cnt[i]);
	if(mx<=1) puts("pairwise coprime");
	else if(mx<n) puts("setwise coprime");
	else puts("not coprime");
	return 0;
}
