//  Mayank Agarwal
//  IIIT Hyderabad



#include<bits/stdc++.h>
using namespace std;
const long long int M = 1000000007; 
#define ll long long int
#define ld double
#define pb push_back
#define mp make_pair
ll power(ll x, ll y,  ll p) 
{ 
    ll res = 1;      
    x = x % p;   
    while (y > 0) 
    { 
        if (y & 1) 
            res = (res*x) % p; 
        y = y>>1;x = (x*x) % p; 
    } return res%p; 
} 
ll modinver(ll a,ll b)
{
    return (power(a,1,M)*power(b,M-2,M))%M;
}
ll prime[1000005]; 
void SieveOfEratosthenes(int n) 
{     
    for (int i = 1; i <=n; ++i)
    {
        prime[i]=i;
    }
    for (int p=2; p*p<=n; p++) 
    { 
        if (prime[p]==p) 
        { 
            for (int i=p*p; i<=n; i += p) 
            {
                if(prime[i]==i)
                    prime[i] = p; 
            }
        } 
    } 
} 
ll pr[1000002];
int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(0);cout.tie(0);
    ll n;
    cin>>n;
    SieveOfEratosthenes(1000000);
    std::vector<ll> v(n);
    ll gc=0;
    ll mini=1e6;
    for (int i = 0; i < n; ++i)
    {
        cin>>v[i];
        gc=__gcd(gc,v[i]);
        mini=min(mini,v[i]);
    }
    if(gc!=1)
    {
        cout<<"not coprime"<<'\n';
        return 0;
    }
    ll fl=0;
    for (int i = 0; i < n; ++i)
    {
        ll xx=v[i];
        while(xx!=prime[xx])
        {
            ll p=prime[xx];
            if(pr[p]!=i+1 && pr[p]!=0)
            {
                fl=1;
            }
            pr[p]=i+1;
            xx=xx/p;
        }
    }
    if(fl)
    {
        cout<<"setwise coprime\n";
    }
    else
    {
        cout<<"pairwise coprime"<<'\n';
    }
}
