#include <bits/stdc++.h>
using namespace std;
#define ll int64_t
#define MOD 1000000007
#define FASTIO ios_base::sync_with_stdio(false);cin.tie(NULL);
#define all(v) (v).begin() , (v).end()
#define sumof(v) accumulate(all(v), 0LL, plus<ll>())
#define maxof(v) max_element(all(v))
#define minof(v) min_element(all(v))
#define inf INT_MAX

ll gcdExtended(ll a, ll b, ll *x, ll *y) 
{ 
    // Base Case 
    if (a == 0) 
    { 
        *x = 0, *y = 1; 
        return b; 
    } 
  
    ll x1, y1; // To store results of recursive call 
    ll gcd = gcdExtended(b%a, a, &x1, &y1); 
  
    // Update x and y using results of recursive 
    // call 
    *x = y1 - (b/a) * x1; 
    *y = x1; 
  
    return gcd; 
} 

ll modInverse(ll b, ll m) 
{ 
    ll x, y; // used in extended GCD algorithm 
    ll g = gcdExtended(b, m, &x, &y); 
  
    // Return -1 if b and m are not co-prime 
    if (g != 1) 
        return -1; 
  
    // m is added to handle negative x 
    return (x%m + m) % m; 
} 

ll modDivide(ll a, ll b, ll m) 
{ 
    a = a % m; 
    ll inv = modInverse(b, m); 
    return (inv * a) % m; 
} 
  

ll lcm(ll a, ll b){
    ll x = (a*b)%MOD;
    return modDivide((ll)x,(ll)__gcd(a,b), (ll)MOD);
}

bool pairwiseCoprime(vector<ll> A){
    if(A.size()==1) return true;
    ll current = (lcm(A[0], A[1]))%MOD;
    ll pro = (A[0]*A[1])%MOD;
    for(ll i=2; i<A.size(); ++i){
        current = lcm(current, A[i]);
        pro = (pro*A[i])%MOD;
    }
    if(pro==current) return true;
    return false;
}

bool setwiseCoprime(vector<ll> A){
    ll current = __gcd(A[0], A[1]);
    for(ll i=2; i<A.size(); ++i) current = __gcd(current, A[i]);
    return current==1;
}

int main(){
    FASTIO
    int testCases = 1;
    // cin>>testCases;
    while(testCases--){
        ll N; cin>>N;
        vector<ll> A(N);
        for(int i=0; i<N; ++i) cin>>A[i];
        if(pairwiseCoprime(A)){
            cout<<"pairwise coprime"<<endl;
        }
        else if(setwiseCoprime(A)){
            cout<<"setwise coprime"<<endl;
        }
        else{
            cout<<"not coprime"<<endl;
        }
    }
}