#include<bits/stdc++.h>
using namespace std;
#define int           long long
#define pb            push_back
#define all(a)        (a).begin(),(a).end()
#define sz(x)         (int)x.size()
#define F             first
#define S             second
#define endl          "\n"
#define inf           (long long)1000000007
#define FOR(i, a, b)  for(int i=a; i<b; i++)
#define bigint        1e18
mt19937 RNG(chrono::steady_clock::now().time_since_epoch().count()); 
#define SHUF(v) shuffle(aint(v), RNG);
// Use mt19937_64 for 64 bit random numbers. 

template <typename T>
T ceil(T a, T b){ return (a+b-1)/b; }


template<typename T>
T binpow(T a, T b, T m) {
    a %= m;
    T res = 1;
    while (b > 0) {
        if (b & 1)
            res = res * a % m;
        a = a * a % m;
        b >>= 1;
    }
    return res;
}

void solve(){
    int n; cin>>n;
    int a[n];
    int g=0;
    FOR(i, 0, n) {
        cin>>a[i];
        g = __gcd(g, a[i]);
    }
    map<int, int> m;
    bool F=1;
    FOR(i, 0, n) {
        m[a[i]]++;
        if(m[a[i]] > 1) {
            F = 0;
            break;
        }
        for(int j = 2;j*j<=a[i];j++) {
            if(a[i]%j==0) {
                m[j]++;
                if(m[j]>1) {
                    F=0;
                    break;
                }
                if(j!=a[i]/j) {
                    m[a[i]/j]++;
                    if(m[a[i]/j]>1) {
                        F=0;
                        break;
                    }
                }
            }
        }
        if(!F) {
            break;
        }
    }
    // F and g==0
    if(F ) {
        cout<<"pairwise coprime";
        return;
    } 
    FOR(i, 1, 1000006) {
        if(m[i]==n) {
            cout<<"not coprime";
            return;
        }
    }
    cout<<"setwise coprime";
}
signed main(){
    ios::sync_with_stdio(false);
    cin.tie(0);     
    int t=1;
    //cin>>t;
    FOR(i, 1, t+1){ 
        //cout<<"Case #"<<i<<": ";
        solve();
    }
    cerr << "\nTime elapsed: " << 1000 * clock() / CLOCKS_PER_SEC << "ms\n";
    return 0;
 
}