#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
ll xxx[1000005];
bool boal=false;
void f(ll n)
{
    for(int i=2; i*i<=n; i++)
    {
        if(n%i==0)
        {
            ll ab=n/i;
            if(xxx[i]==0)
            {
                xxx[i]++;
            }
            else
                boal=true;
            if(ab!=i)
            {
                if(xxx[ab]==0)
                {
                    xxx[ab]++;
                }
                else
                    boal=true;
            }
        }
    }
}
int main()
{
    ll n;
    cin>>n;
    ll a[n];
    for(ll i=0; i<n; i++)
        cin>>a[i];
    ll gcd=a[0];
    for(int i=0; i<n; i++)
    {
        if(!boal)
        {
            f(a[i]);
        }
        gcd=__gcd(gcd,a[i]);
    }
    if(!boal)
        cout<<"pairwise coprime\n";
    else if(gcd==1)
        cout<<"setwise coprime\n";
    else
        cout<<"not coprime\n";
}
