#include<bits/stdc++.h>
using namespace std;
const int mx=2e5+7;

//#define int long long


map<int,bool>mp;
bool fact(int u){
    if(u<=3) {
        if (u != 1) {
            if (mp[u]) {
                return false;
            }
            mp[u] = 1;
            return true;
        }
        else
            return true;
    }
    if(u<100000) {
        for (int i = 2; i <= u; i++) {
            if (u % i == 0) {
                if (mp[i])
                    return false;
                mp[i] = 1;
            }
        }
        return true;
    }
    else {
        for (int i = 2; i < ceil(sqrt(u+1)); i++) {
            if (u % i == 0 && (u / i) != i) {
                if (mp[i]) {
                    return false;
                } else {
                    mp[i] = 1;
                    if (mp[u / i])
                        return false;
                    mp[u / i] = 1;
                }
            } else if (u % i == 0 && (u / i) == i) {
                if (mp[i]) {
                    return false;
                } else {
                    mp[i] = 1;
                }
            }
        }
        return true;
    }
}

void solve(){
    int n;
    cin>>n;
    vector<int>v(n);
    for(int &i:v)
    {
        cin>>i;
    }
    int g=gcd(v[0],v[1]);
    for(int i=2;i<n;i++)
        g=gcd(g,v[i]);
    if(n>170000 && g==1) {
        cout << "setwise coprime" << endl;
        return;
    }
    if(g==1) {
//        sort(v.begin(),v.end());
        for(int i=0;i<n;i++)
        {
            bool ch=fact(v[i]);
            if(!ch)
            {
                cout<<"setwise coprime"<<endl;
                return;
            }
        }
        cout<<"pairwise coprime"<<endl;
    }
    else {
        cout << "not coprime" << endl;
        return;
    }


}


signed main()
{
    ios_base::sync_with_stdio(0);
    cin.tie(NULL);
    int t;
    solve();
}