#include<bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef unsigned long long int ull;
#define endl "\n"
#define pb push_back
#define sq(a) (a)*(a)
#define all(x) (x).begin(), (x).end()
#define debug(x) cerr<<#x<<'='<<(x)<<endl;
#define debugv(v) cerr<<#v<<" : ";for (auto x:v) cerr<<x<<' ';cerr<<endl;
#define MOD 1000000007
#define PI 3.141592653589793238
#define IOS ios_base::sync_with_stdio(false);cin.tie(NULL);

ll gcd(ll a, ll b)
{
    if (b == 0)
        return a;
    return gcd(b, a % b);
}

ll exp(ll x,ll n,ll mod)
{
    ll result=1;
    while(n)
    {
        if(n & 1)
            result=(result * x)%mod;
        x=(x*x)%mod;
        n>>=1;
    }
    return result;
}

const ll N=1e6;
vector<bool> prime(N+1,1);
vector<ll> primes;

void sieve() 
{
  	prime[0]=0;
  	prime[1]=0;

    for(ll i=2;i*i<=N;i++) 
    {
        if(prime[i]) 
        {
        	primes.push_back(i);
            for(ll j=i*i;j<=N;j+=i)
                prime[j]=0;
        }
    }
}

int32_t main()
{
    #ifndef ONLINE_JUDGE
        freopen("input.txt", "r", stdin);
        freopen("output.txt", "w", stdout);
    #endif
    IOS

    sieve();

    ll n;
    cin>>n;

    ll a[n];
    for(ll i=0;i<n;i++)
    	cin>>a[i];

    ll g=a[0];
    for(ll i=1;i<n;i++)
        g=gcd(g,a[i]);

    bool check=true;
    for(ll i=0;i<primes.size();i++)
    {
		ll curr=0;
		for(ll j=0;j<n;j++)
		{
            if(a[j]%primes[i]==0)
            {
                if(curr)
                {
                    check=0;
                    break;
                }
                else
                    curr++;
            }
        }

		if(!check)
            break;
    }

    if(check)
    	cout<<"pairwise coprime"<<endl;
    else if(g==1)
    	cout<<"setwise coprime"<<endl;
    else
    	cout<<"not coprime"<<endl;

    return 0;
}