/*
    author:ujwalll
*/
#pragma GCC optimize("O2")
#include <bits/stdc++.h>
using namespace std; 
#define rep(i,n) for(int i=0;i<(n);i++)
#define for1(i,n) for(int i=1;i<=n;i++)
#define FOR(i,a,b) for(int i=(a);i<=(b);i++)
#define FORD(i,a,b) for(int i=(a);i>=(b);i--)
const int INF = 1<<29;
const int MOD=1073741824;
#define pp pair<ll,ll>
#define ppi pair<int,int>
typedef long long int ll;
bool isPowerOfTwo (ll x)  
{  
    return x && (!(x&(x-1)));  
}
void fastio()
{
    ios_base::sync_with_stdio(false);
    cin.tie(0); cout.tie(0);
}
long long binpow(long long a, long long b) {
    long long res = 1;
    while (b > 0) {
        if (b & 1)
            res = res * a;
        a = a * a;
        b >>= 1;
    }
    return res;
}
const int dx[] = {1,0,-1,0,1,1,-1,-1};
const int dy[] = {0,-1,0,1,1,-1,-1,1};
////////////////////////////////////////////////////////////////////
int freq[1000005];
// vector<int> v[100005];
void solve(int a[],int n){
    rep(i,n){
        for(int j=2;j<=sqrt(a[i]);j++){
            bool f=0;
            while(a[i]%j==0){
                a[i]/=j;
                if(!f){
                    f=1;
                    freq[j]++;
                }
            }
        }
        if(a[i]>2){
            freq[a[i]]++;
        }
    }
}
int main(){
    int tc=1;
    // cin>>tc;
    while(tc--){
        int n;
        cin>>n;
        int a[n];
        int gc=0;
        rep(i,n){
            cin>>a[i];
            gc=__gcd(gc,a[i]);
        }
        solve(a,n);
        for(int i=2;i<=*max_element(a,a+n);i++){
            if(freq[i]<=1)continue;
            else goto done;
        }
        // cout<<freq[2]<<"\n";
        return cout<<"pairwise coprime",0;
        done:
        if(gc==1)cout<<"setwise coprime";
        else cout<<"not coprime";
    }
    return 0;
}