#include <bits/stdc++.h>

using namespace std;
using ll = long long;
using ld = long double;

//エラトステネスの篩
vector<bool> IsPrime;
void e_sieve(int size){
    size=max(2,size);
    IsPrime.assign(size,true);
    IsPrime[0]=false;
    IsPrime[1]=false;
    int chk=2;
    while(chk*chk<=size) {
        if(IsPrime[chk]){
            int tchk=chk*2;
            while(tchk<=size){
                IsPrime[tchk]=false;
                tchk+=chk;
            }
        }
        chk++;
    }
}

//#define int long long
//signed main(){
int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    int n;
    cin >> n;
    vector<int> a(n);
    int m=0;
    for(int i = 0; i < n; i++) {
        cin >> a[i];
        m=max(m,a[i]);
    }
    int g=a[0];
    for(int i = 0; i < n; i++) {
        g=__gcd(g,a[i]);
    }
    if(g!=1){
        cout << "not coprime" << "\n";
        return 0;
    }

    e_sieve(m+5);
    vector<int> p;
    for(int i = 0; i < m; i++) {
        if(IsPrime[i]) p.emplace_back(i);
    }

    for(int i = 0; i < p.size(); i++) {
        int cnt=0;
        for(int j = 0; j < n; j++) {
            if(a[j]%p[i]==0) cnt++;
        }
        if(cnt>1){
            cout << "setwise coprime" << "\n";
            return 0;
        }
    }
    cout << "pairwise coprime" << "\n";

    return 0;
}