#include<bits/stdc++.h>

#define fast ios::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL)
#define int long long
#define endl '\n'

using namespace std;

const int N = 2e6 + 77 , mod = 1e9+7;
int A[N] , D[N];
set<int> s;

void seieve(){
    for(int i = 2 ; i <= N ; i +=2 ) D[i] = 2;
    for(int i = 3 ; i <= N; i += 2) D[i] = 1;
    for(int i = 3 ; i <= N; i += 2){
        if(D[i]==1) for(int j = i*i ; j <= N ; j += i) D[j] = i;
    }
    D[0]= D[1] = 0;
    D[2] = 1;
}

int32_t main(){
    seieve();
    int n ; cin >> n ;
    int g = 0;
    bool pp = true;
    for(int i = 0 ; i < n ; ++i){
        cin >> A[i];
        if(i==0) g = A[i];
        else g = __gcd(g,A[i]);

        set<int> a;
        if(A[i]==1){
            g = 1;
            continue;
        }
        while(A[i]%D[A[i]]==0){
            if(D[A[i]]!=1)a.insert(D[A[i]]);
            A[i] /= D[A[i]];
            if(D[A[i]]==1){
                if(D[A[i]]!=1) a.insert(A[i]);
                break;
            }
        }
        for(auto x : a){
            if(s.find(x)==s.end()) s.insert(x);
            else pp = false;
        }
    }
    if(pp) cout << "pairwise coprime" << endl;
    else if(g==1) cout << "setwise coprime" << endl;
    else cout << "not coprime" << endl;
    return 0;
}