#pragma comment(linker, "/stack:200000000")
#pragma GCC optimize("unroll-loops")
#pragma GCC optimize ("O3")
#include <bits/stdc++.h>
#include <chrono> 
using namespace std::chrono;
#define fl(i,z,n) for(int i=z;i<=(n);i++)
#define flr(i,z,n) for(int i=z;i>=(n);i--)
using namespace std;
#define ll long long 
#define pa(a,s) fl(i,0,s-1) cout<<*(a+i)<<" "; cout<<nl;
#define pv(v) fl(i,0,v.size()-1) cout<<v[i]<<" "; cout<<nl;
#define read(v) fl(i,0,v.size()-1) cin>>v[i];
#define all(v) v.begin(),v.end()
#define pll pair<ll,ll> 
#define vpll vector<pll>
#define vll vector<ll>
#define sll set<ll>
#define spll set<pll>
#define debnl(x) cout<<#x<<"="<<x<<nl;
#define deb(x) cout<<#x<<"="<<x<<" ";
#define mkp(x,y) make_pair(x,y)
#define ump unordered_map
#define ff first
#define ss second
#define in insert
#define sz size
#define len length
#define nl '\n'
#define pb push_back
#define in insert
#define ub upper_bound
#define lb lower_bound
#define ld long double
const int MXN=2e5;
ll mod=1e9+7;

void solve(){
    ll n;
    cin>>n;
    vll v(n);
    read(v);
    int ok=1;
    map<ll,ll> mp,mp2;
    fl(i,0,n-1){
        mp2.clear();
        for(ll j=2;j*j<=v[i];j++){
            if(v[i]%j==0){
                mp2[j]++;
                mp2[v[i]/j]++;
            }
        }
        for(auto x:mp2){
            if(mp.find(x.first)!=mp.end()){
                ok=0;break;
            }
            mp[x.first]++;
        }
        if(!ok) break;
    }
    if(ok){
        cout<<"pairwise coprime"<<nl;
        return;
    }
    ll gcd=v[0];
    fl(i,1,n-1) gcd=__gcd(gcd,v[i]);
    if(gcd==1){
        cout<<"setwise coprime"<<nl;
        return;
    }
    cout<<"not coprime"<<nl;
}
int main(){
    ios_base::sync_with_stdio(false); cin.tie(NULL); ll t=1;
    //cin>>t; //comment for single test
    while(t--) solve();
}