#include<bits/stdc++.h>
#define pb push_back
#define sf scanf
#define pf printf
using namespace std;
#define ll long long
const int N=1e6+9;
const ll mod=1e9+7;
const ll inf=2e10;
int prime[N],vis[N];
void seive()
{
    for(int i=1;i<N;i++) prime[i]=i;
    for(int i=2;i<N;i+=2) prime[i]=2;
    for(int i=3;i*i<N;i+=2) {
        if(prime[i] == i) {
            for(int j=i*i;j<N;j+=i) {
                if(prime[j] == j) prime[j]=i;
            }
        }
    }
}
void slv()
{
    seive();
    int n;
    cin >> n;
    int a[n+3],gcd=0;
    for(int i=0;i<n;i++) {
        cin >> a[i];
        gcd=__gcd(gcd,a[i]);
    }
    bool ok=0;
    for(int i=0;i<n;i++) {
        int x=a[i];
        while (x != 1)
        {
            if(vis[prime[x]]) {
                ok=1;
                break;
            }
            vis[prime[x]]=1;
            x/=prime[x];
        }
        if(ok) break;
    }
    if(!ok) puts("pairwise coprime");
    else {
        if(gcd == 1) puts("setwise coprime");
        else puts("not coprime");
    }
}
int main()
{
    #ifndef ONLINE_JUDGE
        freopen("in.txt", "r", stdin);
        freopen("out.txt", "w", stdout);
    #endif
    int t;
    t=1;
    while (t--)
    {
        slv();
    }
    return 0;
}
