/*
AUTHOR: Naman
*/
#include <bits/stdc++.h>

using namespace std;
#define endl "\n"
#define ll long long
#define ld long double
#define pll pair<long long,long long>
#define vll vector<long long>
#define all(x) x.begin(),x.end()
#define pb push_back
#define Fo(i,k,n) for(ll i=k;i<=n;i+=1)
#define deb(x) cout << #x << "=" << x << endl
#define in(a,n) Fo( i,0,n-1)cin>>a[i]
#define out(a,n) Fo( i,0,n-1)cout<<a[i]<<" ";cout<<endl
#define IOS     ios_base::sync_with_stdio(0); cin.tie(NULL);
const ll N=1e6+1;
const ll M=1e9+7;





int main() {
	IOS
    ll t=1;
	//cin>>t;	
	
	Fo(_,1,t)
	{
	   //cout<<"Case #"<<_<<": ";
	   ll n,m;
	   cin>>n;
	   ll ar[n];
	   in(ar,n);
	   ll gcd=0;
	   Fo(i,0,n-1)gcd=__gcd(gcd,ar[i]);
	   map<ll,ll> sm_fac;
	  
	 
	   for(ll i=2;i*i<N;i++)
	   {
	       if(sm_fac[i])continue;
	       sm_fac[i]=i;
	       for(ll j=i*i;j<N;j+=i)
	       {
	           if(!sm_fac[j])sm_fac[j]=i;
	       }
	       
	   }
	   
	  map<ll,ll> vis;
	   
	   Fo(i,0,n-1)
	   {
	       ll cur=ar[i];
	       while(cur!=1)
	       {  
	           ll fac=1;
	           fac=sm_fac[cur];
	           // deb(fac);
	           if(vis.find(fac)!=vis.end())
	           {
	               if(gcd==1)cout<<"setwise coprime";
	               else cout<<"not coprime";
	               return 0;
	               
	           }
	           vis[fac]=1;
	           while(cur%fac==0)cur/=fac;
	          
	           
	       }    
	   
	   }
	   
	   cout<<"pairwise coprime";
	   


	   cout<<endl;
	   
	}
	
    
}