#include <bits/stdc++.h>
const int MAX=1e6+10;
const int modn=1e9+7;
typedef long long ll ;
#define endl '\n'
#define cwk     freopen("D:\\workplace\\CLion\\in.in","r",stdin),freopen("D:\\workplace\\CLion\\out.out","w",stdout)
using namespace std;
int n,a[MAX];
bool vis[MAX];
vector<int>prime;
int cnt[MAX];
map<int,int>mp;
void prepare(){
    for(int i=2;i*i<=MAX;i++){
        if(!vis[i]){
            for(int j=i*i;j<MAX;j+=i)
                vis[j]=true;
        }
    }
    int k=0;
    for(int i=2;i<MAX;i++){
        if(!vis[i]) {
            prime.push_back(i);
            mp[i]=k++;
        }
    }
}
void solve(){
    cin>>n;
    bool is=true;
    for(int i=0;i<n;i++) {
        cin >> a[i];
        int k=a[i];
        if(vis[k]){
            cnt[mp[k]]++;
            if(cnt[mp[k]]>=2) is=false;
            continue;
        }
        for(int j=0;k!=1&&j<prime.size();j++){
            if(k%prime[j]==0) {
                cnt[j]++;
                if(cnt[j]>=2) is=false;
            }
            while(k%prime[j]==0){
                k/=prime[j];
            }
            if(vis[k]){
                cnt[mp[k]]++;
                if(cnt[mp[k]]>=2) is=false;
                break;
            }
        }
    }
    if(is){
        cout<<"pairwise coprime\n";
        return;
    }
    int ans=a[0];
    for(int i=1;i<n;i++){
        ans=__gcd(ans,a[i]);
        if(ans==1){
            cout<<"setwise coprime\n";
            return;
        }
    }
    cout<<"not coprime\n";

}
signed main() {
    ios::sync_with_stdio(false);cin.tie(nullptr);cout.tie(nullptr);
    //cwk;
    prepare();
    int _=1;
    //cin>>_;
    while(_--){
        solve();
    }
    return 0;
}