
#include <bits/stdc++.h>
#define ll long long
using namespace std;
const ll inf =1e6+9,mod = 1e9+7;
int n,a[inf];
//generate a  array of primes using Sieve of Eratosthenes:
const int MX=1000010;
bitset<MX> bs;
vector <int > primes;
long long sieve_size;
void sieves() {
sieve_size=MX-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((int )i);
    }
}
}

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

    for(int i=1;i<=n;i++){
        for(auto o:primes){
            if(o*o > a[i])
                break;
                if(a[i]%o)
                    continue;
                int x = a[i]/o,y = o;
                if(valid[x] || valid[y]){
                    if(g==1)
                        puts("setwise coprime"),exit(0);
                    else
                        puts("not coprime"),exit(0);
                }
                valid[x] = valid[y] = 1;
        }
    }
    puts("pairwise coprime");
}
