#include<bits/stdc++.h>
using namespace std;

const int N = 1e6+3;
int n;
int a[N],f[N];


vector<int>primes;
void init() {
    bitset<N>v;
    for(int i=2;i<N;++i) {
        if(!v[i]) {
            primes.push_back(i);
            for(int j=i+i;j<N;j+=i)
                v[j] = 1;
        }
    }
}

void solve(){
    cin >> n;
    bool flg = 0;
    int g = 0;
    for(int i=0;i<n;++i) {
        int t;
        cin >> t;
        a[i] = t;
        g=__gcd(g,a[i]);
        for(int j=0;j<(int)primes.size()&&t!=1;++j) {
            if(t%primes[j]==0) {
                int cnt=0;
                while(t%primes[j]==0)
                    t/=primes[j] , cnt++;
                if(f[primes[j]]!=0)
                    flg=1;
                f[primes[j]]+=cnt;
            }
        }
    }
    if(!flg) {
        cout << "pairwise coprime\n";
    }
    else if(g==1) {
        cout << "setwise coprime\n";
    }
    else {
        cout << "not coprime\n";
    }
}

int main(){
    init();
    ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);
    int t=1;
    while(t--)
        solve();
    return  0;
}
