#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
const ll MOD = 1000000007;
const ld PI = acos(-1);  
const ld EPS = 0.0000000001;
const ll LINF = 1001002003004005006ll;
const int INF = 1001001001;
#define rep(i, n) for(ll i=0; i<(ll)(n); i++)
#define repd(i, n) for(ll i=n-1; 0<=i; i--)
#define FOR(i, a, b) for(ll i=a; i<(ll)(b); i++)
#define FORD(i, a, b) for(ll i=b-1; (ll)(a)<=i; i--)
#define ALL(x) x.begin(), x.end()
#define MAX(x) *max_element(ALL(x))
#define MIN(x) *min_element(ALL(x))
int dx[4] = {1, 0, -1, 0};
int dy[4] = {0, 1, 0, -1};


int main(){
    ll n;   cin >> n;
    vector<ll> a(n);
    rep(i, n) cin >> a[i];
    vector<ll> key(n, -1);
    sort(ALL(a));
    ll res=0;
    string out[3] = {"pairwise coprime", "setwise coprime", "not coprime"};
    set<ll> st;
    rep(k, n){
        for(int i=2; i*i<=a[k]; i++){
            if(a[k]%i==0){
                key[k] = i;
                break;
            }
        }
        if(key[k]<0) key[k] = a[k];
        if(st.find(key[k])!=st.end()) res = 1;
        if(1<key[k]) st.insert(key[k]);
    }
    //rep(i, n) cout << key[i] << ' ';
    if(0<res){
        ll tmp = a[0];
        rep(i, n-1) tmp = gcd(tmp, a[i+1]);
        res += 1!=tmp;
    }
    cout << out[res] << endl;
}
