#define ll long long
#define pb push_back
#define make_pair mp
#define first f
#define second s
#define upper_bound ub
#define lower_bound lb
#define MOD 1000000007
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;


#define ordered_set tree<pair<ll,ll> , null_type,less<pair<ll,ll> >, rb_tree_tag,tree_order_statistics_node_update>ll fn


void solve(){
    ll n;cin>>n;
    ll a[n+1],freq[1000006];
    memset(freq,0,sizeof(freq));
    ll gcd=0;
  	bool f=1;
    for(ll i=1;i<=n;i++){
        cin>>a[i];
        if(gcd==0){
            gcd=a[i];
        }
        else{
            gcd = __gcd(gcd,a[i]);
        }
        for(ll d=1;d*d<=a[i]&&f==1;d++){
            if(a[i]%d==0){
                freq[d]++;
                if(a[i]/d!=d){
                    freq[a[i]/d]++;
                }
              	if(freq[d]>1||freq[a[i]/d]>1){
                	f=0;
                }
            }
        }
    }
    if(f){
        cout<<"pairwise coprime";return;
    }
    if(gcd==1){
        cout<<"setwise coprime";return;
    }
    cout<<"not coprime";
    return;
}

int main ()
{
  ios_base::sync_with_stdio (false);
  cin.tie (NULL);
  ll t;
  //cin>>t;
  t = 1;
  while (t)
    {
      solve();t--;
      //cout<<"end of test case"<<endl;
    }
  return 0;
}
