#include<bits/stdc++.h>
using namespace std;
typedef long long int ll;
#define endl '\n'
#define rep(i,n) for(int i=0;i<n;i++) 
#define all(v) v.begin(),v.end()
#define F first
#define S second 
const ll MOD=1e9+7;
template<typename ForwardIterator,typename T>
ForwardIterator first_less_than(ForwardIterator first,ForwardIterator last,T val)
{
	auto it=lower_bound(first,last,val);
	return (it==first?first:it);
}
bool isPrime(ll n) 
{ 
    // Corner cases 
    if (n <= 1)  return false; 
    if (n <= 3)  return true; 
  
    // This is checked so that we can skip  
    // middle five numbers in below loop 
    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;
	ll arr[n];
	rep(i,n)
	{
		cin>>arr[i];
	}
	bool temp=false;
	for(int i=0;i<n;i++)
	{
		for(int j=i+1;j<n;j++)
		{
			if(__gcd(arr[i],arr[j])!=1)
			{
				temp=true;
				break;
			}
		}
	}
	if(temp)
	{
		ll res=arr[0];
		for(int i=1;i<n;i++)
		{
			res=__gcd(res,arr[i]);
			if(res==1)
			{
				break;
			}
		}
		if(res==1)
		{
			cout<<"setwise coprime"<<endl;
		}
		else
		{
			cout<<"not coprime"<<endl;
		}
	}
	else
	{
		cout<<"pairwise coprime"<<endl;
	}
}

int main()
{
	ios_base::sync_with_stdio(false); 
  	 cin.tie(NULL);  
	int tt;
	tt=1;
	while(tt--)
	{
		solve();
	}
}
