/******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               1000005
#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;
}
vector<lld> sv;
void sieve(lld N) {
        bool isPrime[N+1];
       itr(i,3,N){
if(i%2!=0)
isPrime[i]=true;
else
isPrime[i]=false;
}
        isPrime[0] = false;
        isPrime[1] = false;
        isPrime[2]=true;  
      for(lld i = 2; i <= N;i++) {
             if(isPrime[i] == true) {                    //Mark all the multiples of i as composite numbers
                 for(lld j = i * i; j <= N ;j += i)
                     isPrime[j] = false;
            }
        }
   iot(N) if(isPrime[i]) sv.pb(i);
} 

int main(){
       ios_base::sync_with_stdio(false);
             cin.tie(0);
            cout.tie(0);
    sieve(tod);        
    lld n; cin>>n;
    pls(n,a);
    lld hash[tod]={0};
    iot(n) hash[a[i]]++;
    lld fg=1;
    for(auto &i:sv){
        lld cc=0;
        lld p=i;
        while(p<tod){
            if(hash[p])  cc++;
            p+=i;
            if(cc>1) break;
        }
        if(cc>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";
    
}

