#include<bits/stdc++.h>
using namespace std;
typedef		 long long int    ll;
typedef		 double   ld;
typedef		vector<ll>      vll;
#define     fi              first
#define     print(v)        for(ll i:v) cout<<i<<ss
#define     se              second
#define		pb              push_back
#define		nn              "\n"
#define		all(p)          p.begin(),p.end()
#define		zz(v)           (ll)v.size()
#define 	S(a)            scanf("%lld",&a)
#define 	SS(a,b)         scanf("%lld %lld",&a,&b)
#define 	SSS(a,b,c)      scanf("%lld %lld %lld",&a,&b,&c)
#define		ss              ' '
#define     pii             pair<ll,ll>
#define		gcd(a,b)        __gcd(a,b)
#define		lcm(a,b)        (a*b)/gcd(a,b)
const double eps = 1e-8;





int main()
{
//    ios::sync_with_stdio(0);
//    cin.tie(0);
    ll n;
    cin>>n;

    ll ar[n+10];
    ll f1=1;
    map<ll,ll>mp;
    for(ll i=0; i<n; i++)
    {
        cin>>ar[i];
        ll e=ar[i];
        for(ll j=2; j*j<=e; j++)
        {
            if(e%j==0)
            {
                ll a=j;
                ll b=e/j;
                if(mp[a]||mp[b])
                    f1=0;

                mp[a]=1;
                mp[b]=1;
            }
        }
    }

    ll f2=1;

    ll gd=ar[0];

    for(ll i=1; i<n; i++)
    {
        gd=gcd(gd,ar[i]);
    }
    if(gd!=1)
        f2=0;

    if(f1)
    {
        cout<<"pairwise coprime"<<nn;
    }
    else if(f2)
    {
        cout<<"setwise coprime"<<nn;
    }
    else
        cout<<"not coprime"<<nn;







}


/* Final check before submit :

1. array size or integer overflow,like uninitialised 0 index.

2. Think twice,code once.check all possible counter test case.

3. Be careful about corner case! n=1?k=1? something about 0?

4. avoid stupid mistake!complexity(t/m)?precision error?submit same code twice?

5. if got WA than remember that you are missing something common.
   *** Be confident!!! who knows? may be your one step back to AC ***
4. minus mod ans=(ans-k+mod)%mod;

*/




