#pragma GCC optimize("Ofast")
#include<bits/stdc++.h>
using namespace std;
#define ll long long 
#define ld double 
#define rep(i,a,b) for(ll i=a; i<b; ++i)
#define BOOST std::ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);
#define pb push_back
#define all(v) v.begin(),v.end()
#define sl(a) a.size()
#define mod 1000000007 
#define lcm(a,b) (a*b)/__gcd(a,b)
#define MAX1 100006
#define f first
#define s second
#define pi 2*acos(0.0)
bool isprime(int n) 
{ 
    if (n <= 1)  return false; 
    for (int i = 2; i < n; i++) 
        if (n % i == 0) 
            return false; 
  
    return true; 
} 
void solve()
{
    ll n; cin>>n;
    set<ll> se;
    ll gc;
    rep(i,0,n)
    {
        ll x; cin>>x;
        if(i==0) gc=x;
        if(!isprime(x)) se.insert(x); 
        gc=__gcd(gc,x);
    }
    if(gc!=1) cout<<"not coprime";
    else
    {
        if(sl(se)<=1) {  cout<<"pairwise coprime";  return;  }
        for(auto i: se)
        {
            for(auto j: se)
            {
                if(__gcd(i,j)!=1)
                {
                    cout<<"setwise coprime";
                    return;
                }
            }
        }
        cout<<"pairwise coprime";
    }
    
}
int main()
{
    #ifndef ONLINE_JUDGE
    // for getting input from input.txt
    freopen("input.txt","r",stdin);
    //for getting error from error.txt
    freopen("error.txt", "w", stderr);
    // for writing output to output.txt
    freopen("output.txt","w",stdout);
    #endif
    BOOST
    int T=1;  //cin>>T;
    while(T--) solve();
    cerr<<"Time taken : "<<(float)clock()/CLOCKS_PER_SEC<<" secs"<<"\n";
    cerr<<"My CLOCKS_PER_SEC= "<<CLOCKS_PER_SEC<<"\n";
    return 0;
}
