#include<bits/stdc++.h>
using namespace std;

#define FASTIO1 ios_base::sync_with_stdio(false)
#define FASTIO2 cin.tie(NULL),cout.tie(NULL)
#define count_1(p) __builtin_popcountll(p)
#define count_0(p) __builtin_ctzll(p)
#define all(x) (x).begin(),(x).end()
#define ll long long
#define pb push_back
#define mp make_pair
#define fi first
#define se second

ll power(ll x,ll y,ll p);
const ll inf=999999999;
const ll mod=1e9+7;
bool tc=false;

bool isprime(ll n) 
{ 
    if(n<=1) return true; 
    if(n<=3) return false; 
  	if(n%2==0 || n%3==0) 
        return false;
    for(ll i=5;i*i<=n;i=i+6) 
        if(n%i==0 || n%(i+2)==0) 
            return false;
    return true; 
}  

void solve()
{
	ll n; cin>>n;
	bool pairwise=true,setwise=true;
	ll oddc=0,evenc=0,primec=0,pc2=1,cur;
	for(ll i=0;i<n;i++)
	{
		cin>>cur;
		pc2=__gcd(pc2,cur);
		if(isprime(cur)) primec++;
		else if(cur&1) oddc++;
		else evenc++;
	}
	if(pc2!=1) setwise=false;
	if(primec<n-2 || oddc>1 || evenc>1)
		pairwise=false;
	if(pairwise)
		cout<<"pairwise coprime";
	else if(setwise)
		cout<<"setwise coprime";
	else
		cout<<"not coprime";
}

int main() 
{
    FASTIO1;
    FASTIO2;
    clock_t start=clock();
    ll t=1; 
    if(tc) cin>>t;
    while(t--)
        solve();
    cerr<<fixed<<setprecision(6);
    cerr<<(double)(clock()-start)/CLOCKS_PER_SEC<<endl;
    return 0;
}

ll power(ll x,ll y,ll p)  
{  
    ll res=1; x=x%p;
    if(x==0) return 0;
    while(y>0)  
    {
        if(y&1) res=(res*x)%p;
        y=y>>1; x=(x*x)%p;  
    }
    return res;  
}  
