#include<bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
using namespace __gnu_pbds;
using namespace std;
typedef long long ll;
#define speed ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0)
#define mp make_pair
#define pb push_back
#define ff first
#define ss second
#define vi vector<ll>
#define vll vector<ll> 
#define all(x) (x).begin() , (x).end()
#define inf 1000000000
#define mod 1000000007

void dbg(){
	cerr << endl;
}
template<typename Head , typename... Tail>
void dbg(Head h , Tail... t){
	cerr << h << " ";
	dbg(t...);
}

#ifdef EMBI_DEBUG
#define debug(...) cerr << "(" << #__VA_ARGS__  << "): ", dbg(__VA_ARGS__)
#else 
#define debug(...)
#endif

const ll max_n = 1e6 + 9;

typedef tree<ll,null_type,less<ll>,rb_tree_tag,tree_order_statistics_node_update> indexed_set;
ll power(ll a , ll b)
{
    ll prod = 1;
    while(b)
    {
        if(b&1)
        prod = (prod*a)%mod;
        a = (a*a)%mod;
        b >>= 1;
    }
    return prod;
}
void solve(){
	ll n;
    cin >> n;
    map<ll , vector<ll>> m;
    ll a[n];
    ll hcf = 0;
    for(ll i = 0 ; i < n ; i++){
        cin >> a[i];
        hcf = __gcd(a[i] , hcf);
    }

    map<ll, vector<ll>> primes;
    for(ll i = 2 ; i <= max_n ; i++){
        ll flag = 0;
        for(ll j = 2 ; j * j <= i ; j++){
            if(i % j == 0){
                flag = 1;
                vector<ll> vec = primes[i / j];
                ll cnt = 0 , tmp = i;
                while(tmp % j == 0){
                    cnt++;
                    tmp /= j;
                }
                if(cnt == 1){
                    vec.pb(j);
                }
                primes[i] = vec;
                break;
            }
        }
        if(!flag){
            primes[i] = vector<ll>(1 , i);
        }
    }

    for(ll i = 0 ; i < n ; i++){
        for(auto it : primes[a[i]]){
            m[it].pb(i);
        }
    }

    if(hcf != 1){
        cout << "not coprime\n";
    }
    else{
        for(auto it : m){
            if(it.ss.size() > 1){
                cout << "setwise coprime\n";
                return;
            }
        }
        cout << "pairwise coprime\n";
    }
}
signed main(){
	ll t = 1;
	// cin >> t;
	while(t--){
		solve();
	}
}