#include<bits/stdc++.h>
using namespace std;
#define int long long

vector<int> prime_factors(int n){
    vector<int> ans;
    for (int i=2; i<n; i++){
        if (n%i==0){
            ans.push_back(i);
            while(n%i==0) {
                n /= i;
            }
        }
    }
    return ans;
}

int cnt[1000010];

signed main(){
    ios_base::sync_with_stdio(0),cin.tie(0),cout.tie(0);

    int n;
    cin>>n;
    int a[n], b[n];
    for (int i=0; i<n; i++) cin>>a[i];

    int pairwise = 1;

    for (int i=0; i<n; i++){
        vector<int> v = prime_factors(a[i]);
        for (auto e:v){
            cnt[e]++;
        }
    }

    for (auto e:cnt){
        pairwise &= (e<=1);
    }

    if (pairwise) {
        cout<<"pairwise coprime"<<endl;
    }
    else {
        int g = a[0];
        for (int i=1; i<n; i++){
            g = __gcd(g, a[i]);
        }
        if (g==1){
            cout<<"setwise coprime"<<endl;
        }
        else{
            cout<<"not coprime"<<endl;
        }
    }

    return 0;
}
