#include <bits/stdc++.h>
#define ll long long
using namespace std;
const ll inf =1e6+9;
ll n,a[inf];

bitset<inf> bs;
vector <ll > primes;
long long sieve_size,g;
void sieves()
{
    sieve_size=inf-9;
    bs.set();
    bs[0]=bs[0]=0;
    for(long long i=2; i<=sieve_size; i++)
    {
        if(bs[i])
        {
            for(long long j=i*i; j<=sieve_size; j+=i)
                bs[j]=0;
            primes.push_back((ll )i);
        }
    }
}

bool valid[inf];

void check(int x){
     if(valid[x] )
            {
                if(g==1)
                    puts("setwise coprime"),exit(0);
                else
                    puts("not coprime"),exit(0);
            }
            valid[x]  = 1;
}

int main()
{
    sieves();
    cin>>n;
    for(ll i=1; i<=n; i++)
        scanf("%lld",a+i);
     g = a[1];
    for(ll i=2; i<=n; i++)
        g = __gcd(g,a[i]);

    for(ll i=1; i<=n; i++)
    {
        for(auto o:primes)
        {
            if(o*o > a[i])
                break;
            if(a[i]%o)
                continue;
            ll x = a[i]/o,y = o;
            a[i] /= o;
            check(x),check(y);
        }
        if(a[i] != 1){
            check(a[i]);
        }
    }
    puts("pairwise coprime");
}
