#include <bits/stdc++.h>
typedef long long ll;
typedef long double ld;
#define endl "\n"
#define fi first
#define se second
#define For(i,a,b) for(ll i=a;i<b;i++)
#define RFor(i,b,a) for(ll i = b;i>=a;i--)
#define sz size()
#define PQ priority_queue
#define len length()
#define mll map<ll,ll>
#define mpll map<pll,ll>
#define vll vector<ll>
#define sll set<ll>
#define vpll vector<pair<ll,ll> >
#define mp(x,y)  make_pair(x,y)
#define pll pair<ll,ll>
#define pb push_back
#define pf push_front
#define ALL(v) v.begin(),v.end()
#define LAPAK ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);
using namespace std;

const ll MOD = 2*(1e9 + 7);
const ll INF = 2e18;
const ll MAX = 1e6 + 2;


int main() {
    LAPAK
    
    ll n;
    cin>>n;
    ll a[n];
    int freq[MAX] = {};
    ll g = 0;
    For(i,0,n){
        cin>>a[i];
        for(int j = 2;j<=sqrt(a[i]);j++){
            if(a[i]%j==0){
                freq[j]++;
                if(a[i]/j != j)freq[a[i]/j]++;
            }
        }
        g = __gcd(g,a[i]);
    }
    
    bool pairwise = true;
    For(i,2,MAX){
        pairwise &= (freq[i]<=1);
    }
    if(pairwise)cout<<"pairwise coprime";
    else if(g==1)cout<<"setwise coprime";
    else cout<<"not coprime";
    
    return 0;
}