#include <bits/stdc++.h>

using namespace std;

#define pan(i,n) for(int i=0;i<n;i++)
#define pans(i,n,a) for(int i=a;i<n;i++)
#define cpan(i,a,n,d) for(int i=a;i<n;i+=d)
#define ll long long int
#define vi vector<int>
#define vl vector<ll>
#define pb push_back
#define INF INT_MAX
#define MOD 1000000007
#define PI 3.141592653
#define pll pair<ll,ll>
#define pii pair<int,int>

vi fq(1000001,-1);
bool fac(int n, int idx){
    int x = n;
    if(n%2==0){
        if(fq[2] == -1){
            while(!(n%2))
                n/=2;
            fq[2] = idx;
        }
        else
            return false;
    }
    for(int i = 3; i <= sqrt(x); i += 2){
        if(n%i == 0){
            if(fq[i] == -1){
                while(!(n%i))
                    n/=i;
                fq[i] = idx;
            }
            else
                return false;
        }
    }
    if(fq[n] != -1)
        return false;
    return true;
}

void solve(){
    int n;
    cin >> n;
    vi v(n);
    pan(i,n)
        cin >> v[i];
    int gcd = v[0];
    pans(i,n,1)
        gcd = __gcd(gcd, v[i]);
    int res = (gcd == 1) ? 1:0, ans = 1;
    if(res){
        pan(i,n)
            ans &= fac(v[i],i);
        if(ans)
            cout << "pairwise coprime\n";
        else
            cout << "setwise coprime\n";
    }
    else
        cout << "not coprime\n";
}

int main() {
    ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
    int tst = 1;
    //cin >> tst;
    while(tst--)
        solve();
    return 0;
}
