#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const ll mod = 1e9+7;
const long long INF = 1e15;

const int Max = 1e7;
vector<int> mps(Max+1);

void mpsinit(){//O(NloglogN)
    for(int i = 0; i <= Max; i++) mps[i] = i;
    for(ll i = 2; i*i <= Max; i++){
        if(mps[i] == i){
            for(ll j = i*i; j <= Max; j += i){
                if(mps[j] == j) mps[j] = i;
            }
        }
    }
}
template<typename T>
vector<T> prime_factorization(T n){//O(logN)
    vector<T> ret;
    if(mps[n] == n) ret.push_back(n);
    while(mps[n] != n){
        int k = mps[n];//
        ret.push_back(k);
        while(n%k == 0) n /= k; 
    }
    
    return ret;
}

int main(){
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);cout.tie(NULL);
    
    int n;
    cin >> n;
    vector<int> a(n);
    for(int i = 0; i < n; i++) cin >> a[i];

    mpsinit();
    map<int,bool> seen;
    bool pc = true;

    for(int i = 0; i < n; i++){
        if(a[i] == 1) continue;
        vector<int> fp = prime_factorization(a[i]);
        for(int j = 0; j < (int)fp.size(); j++){
            if(seen[fp[j]]) pc = false;
            seen[fp[j]] = true;
        }
    }

    int g = __gcd(a[0],a[1]);
    for(int i = 0; i < n; i++) g = __gcd(g,a[i]);

    if(pc) cout << "pairwise coprime" << endl;
    else if(g == 1) cout << "setwise coprime" << endl;
    else cout << "not coprime" << endl;
}