#include<bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#define ll long long
#define vll vector<ll>
#define pll pair<ll,ll>
#define pqueue priority_queue<ll>
#define piqueue priority_queue<ll,vll ,greater<ll>>
#define pinf LLONG_MAX
#define ninf LLONG_MIN
#define all(v) v.begin(),v.end()
#define endl '\n'
#define MOD 1000000007
#define pb push_back
#define ff first
#define ss second
#define pi 3.1415926535897932384
using namespace std;
using namespace __gnu_pbds;

typedef tree<ll, null_type, less<ll>, rb_tree_tag,
tree_order_statistics_node_update> ordered_set;
typedef tree<ll, null_type, less_equal<ll>, rb_tree_tag,
tree_order_statistics_node_update> ordered_multiset;

void pv(vector<auto> &v,ll start = 0, ll end = 0){
    if(end != v.size() - 1) end = v.size() - 1;
    for(ll i = start; i <= end; i++) cout << v[i] << " "; cout << endl;
}
void inline pp(pair<auto, auto> p) { cout << p.ff << " " << p.ss << endl; }
void inline in(vector<auto> &v, ll n) {
    v.resize(n); for(ll i = 0; i < n; i++) cin >> v[i];
}
void inline sortv(vector<auto> &v) { sort(all(v)); }
void inline sortvr(vector<auto> &v) { sort(v.rbegin(), v.rend()); }
bool inline isVowel (char c) {
    return (c == 'a' || c == 'e' || c == 'i' || c == 'o' || c == 'u');
}
void fast(){
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);
}
int solve();
int main(){
    fast();
    ll t = 1;
    // cin >> t;
    while(t--){
        solve();
    }
}
vector<ll> prime(1000500, 1);
void sieve(ll n){
    for(ll i = 0; i <= n; ++i)
        prime[i] = i;
    for(ll p = 2; p * p <= n; p++){
        if(prime[p] == p){
            for (ll i = p; i <= n; i += p)
                if(prime[i] == i)
                    prime[i] = p;
        }
    }
}
int solve(){
    sieve(1000050);
    ll n;
    cin >> n;
    vll a;
    in(a, n);
    map<ll,ll> m;
    for(auto i: a){
        ll x = i;
        // cout << x << " : " << prime[x] << endl;
        while(prime[x] != 1){
            m[prime[x]]++;
            ll d = prime[x];
            while(x % d == 0){
                x /= d;
            }
        }
    }
    for(auto i: m){
        // cout << i.ff << " = " << i.ss << endl;
        if(i.ss >= n)
            return cout << "not coprime" << endl, 0;
        if(i.ss > 1)
            return cout << "setwise coprime" << endl, 0;
    }
    cout << "pairwise coprime" << endl;
    return 0;
}