/******Old_school_@23******/
/******Why_would_a_compiler_lie?******/
#include<bits/stdc++.h>
#pragma GCC optimize("O3")
#pragma GCC target("avx,avx2,fma") 
#pragma GCC optimization ("unroll-loops")
using namespace std;
#define lld               long long int
#define ld                long double
#define pb                push_back
#define ppb               pop_back 
#define mp                make_pair
#define F                 first
#define S                 second
#define nl                '\n'
#define all(c)            (c).begin(),(c).end()
#define rall(c)           (c).rbegin(),(c).rend()
#define sz(c)             (c).size()
#define tr(x,a)           for(auto &a : x)
#define psnt(x,a)         (x).find(a)!=(x).end()
#define vpsnt(x,a)        find(all(x),a)!=(x).end()
#define lexichar(x,y)     lexicographical_compare(x,x+strlen(x),y,y+strlen(y)) //modify the ranges
#define lexistr(x,y)      lexicographical_compare(x.begin(),x.end(),y.begin(),y.end()) 
#define MOD               1000000007
#define pi                3.1415926536
#define tod               1
#define itr(i,a,b)        for(lld i=a;i<=b;i++)
#define itrn(i,a,b)       for(lld i=a;i>=b;i--)
#define iot(n)            for(lld i=0;i<n;i++)
#define pls(n,arr)        lld arr[n]; iot(n)  cin>>arr[i];
#define bye               fflush(stdout)

typedef pair<lld,lld>     pii;
typedef pair<string,lld>  psi;
template <typename T>
bool mycomp(T x,T y){ 
   return (x==y);  //give your condition here
}
bool paircomp(const pair<lld,lld> &x,const pair<lld,lld> &y){ 
return x.second<y.second;
}
lld hashr[1000005];
#define MAXN   1000005 
lld spf[MAXN]; 

void sieve() 
{ 
    spf[1] = 1; 
    for (int i=2; i<MAXN; i++) 

        spf[i] = i; 
  

    for (int i=4; i<MAXN; i+=2) 
        spf[i] = 2; 
  
    for (int i=3; i*i<MAXN; i++) 
    { 
        if (spf[i] == i) 
        { 
            for (int j=i*i; j<MAXN; j+=i) 
                if (spf[j]==j) 
                    spf[j] = i; 
        } 
    } 
} 
void getFactorization(lld x) 
{ 
    lld flag[MAXN]={0};
    vector<lld> ret; 
    while(x!=1) 
    { 
        flag[spf[x]]++;
        if(flag[spf[x]]==1)
           hashr[spf[x]]++; 
        if(hashr[spf[x]]>1) return;   
        x=x/spf[x]; 
        
    } 

}
int main(){
       ios_base::sync_with_stdio(false);
             cin.tie(0);
            cout.tie(0);
    sieve();        
    lld n; cin>>n;
    pls(n,a);
    iot(n)
       getFactorization(a[i]);
    lld fg=1;
    iot(MAXN) {
        if(hashr[i]>1){ fg=-1; break;}
    }
    if(fg==1){
        cout<<"pairwise coprime";
        return 0;
    }
    lld g=a[0];
    iot(n){
        g=__gcd(g,a[i]);
    }
    if(g==1)  cout<<"setwise coprime";
    else  cout<<"not coprime";
    
}
