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

// --------------------------------------------------------------------------------
#define FASTIO	ios_base::sync_with_stdio(false),cin.tie(NULL),cout.tie(NULL)
#define ll long long 
#define mset(arr,val) memset(arr,val,sizeof(arr))
#define frepi(a,b) for(int i=a;i<=b;++i)
// #define int long long
// --------------------------------------------------------------------------------

void test_case(int tc)
{
	int n;cin>>n;
	int primes[1000009];
	mset(primes,0);
	primes[0]=1,primes[1]=1;
	for(int i=2;i*i<=1000009;++i)
	{
		if(primes[i]==0)
		{
			for(int j=i;j<1000009;j+=i)primes[j]=i;
		}
	}
	int arr[n];frepi(0,n-1)cin>>arr[i];
	int gcd = arr[0];
	for(int i=1;i<n;++i)gcd=(__gcd(arr[i],gcd));
	if(gcd!=1){
		cout<<"not coprime";
		return;
	}
	set<int>factors;
	for(int i=0;i<n;++i){
		int x = arr[i];
		while(x>1){
			int div = primes[x];
			if(factors.find(div)!=factors.end()){
				cout<<"setwise coprime";
				return;
			}
			factors.insert(div);
			while(x%div==0)x/=div;
		}
	}
	cout<<"pairwise coprime";
}

int32_t main()
{
	FASTIO;
	#ifndef ONLINE_JUDGE
		freopen("/home/suryakant/input.txt","r",stdin);
		freopen("/home/suryakant/output.txt","w",stdout);
	#endif
	
    int tc=1;
    //cin>>tc;
    for(int i=1;i<=tc;++i)test_case(tc);
}