#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define pb push_back
ll mod=1e9+7;
bool prime[1000005];
ll arr[1000001];
vector<ll> primes;
unordered_map<ll,bool> seen;
ll good=1;

void sieve()
{
    // cout<<"n sicve ";
    ll n=1000000;
    for(ll i=0;i<=n;i++)
        if(i%2 ==0) prime[i]=0;
        else prime[i]=1;
    // cout<<"n sicve 2";

    prime[2]=1; prime[1]=0;
    primes.pb(2);

    for(ll i=3;i<=n;i+=2)
    {
        if(prime[i])
        {
            // cout<<i<<" ";
            primes.pb(i);
            for(ll j=i*i;j<=n;j+=i)
                prime[j]=0;
        }
    }
}


void primefactorize(ll n)
{
    if(n==1) return;
    if(prime[n])
    {
        if(seen[n]) good=0;
        seen[n]=1;
        return;
    }
    for(int i=0;i<primes.size() &&n>1;i++)
    {
        if(n%primes[i]==0)
        {
        if(seen[primes[i]]) good=0;
        while(n%primes[i] ==0)
        {
            n/=primes[i];
            // cout<<primes[i]<<" ";
        }

        seen[primes[i]]=1;
        }
    }
}

int main()
{
    sieve();
    // for(int i=0;i<10;i++) cout<<primes[i]<<" ";cout<<endl;
        ll n;cin>>n;
        for(int i=0;i<n;i++) {cin>>arr[i];}
        ll g=arr[0];
        for(int i=0;i<n;i++)
        {
            primefactorize(arr[i]);
            g=__gcd(g,arr[i]);;
        }
        if(good) cout<<"pairwise coprime";
        else if(g==1) cout<<"setwise coprime";
        else cout<<"not coprime";
    
}