#pragma GCC optimize("Ofast")
#include <bits/stdc++.h>
using namespace std;
#include <ext/pb_ds/assoc_container.hpp> 
#include <ext/pb_ds/tree_policy.hpp> 
using namespace __gnu_pbds; 
 
#define ll long long int
#define fast ios_base::sync_with_stdio(false)
#define fast_input cin.tie(NULL)
#define fast_output cout.tie(NULL)
#define vi vector<long long int> 
#define pb push_back
#define pa pair<long long int ,long long int> 
#define f(a,x,b) for(int a=x;a<b;a++)
#define fr(a,x,b) for(int a=x;a>=b;a--)
#define sort(x) sort(x.begin(),x.end());
#define siz(a) (int)a.size()
#define mod 1000000007
#define F first
#define S second
#define um unordered_map<ll,ll>
#define ordered_set tree<pa, null_type,less<int>, rb_tree_tag,tree_order_statistics_node_update>
vector<ll> spf(1000001,-1);
ll isprime[1000001];
void solve()
{
	ll n;
	cin>>n;
	vi v(n);
	ll gcc;
	f(i,0,n)
	{
		cin>>v[i];
		if(i==0)
		{
			gcc=v[i];
		}
		gcc=__gcd(gcc,v[i]);
	}
    if(gcc!=1)
	{
		cout<<"not coprime"<<endl;
		return;
	}
	isprime[0]=1;
	isprime[1]=1;
	for(int j=2;j*j<=1000000;j++)
	{
	  if(isprime[j]==0)
	  {
      for(int i=j*j;i<=1000000;i+=j)
	  {
		  spf[i]=j;
		  isprime[i]=1;
	  }
	  }
	}
	ll cnt[1000001]={0};
	f(i,0,n)
	{
		vi re;
		ll sp=spf[v[i]];
		while(sp!=-1)
		{
			re.pb(sp);
			cnt[sp]++;
			while(v[i]%sp==0)
			{
				v[i]/=sp;
			}
			sp=spf[v[i]];
			if(sp==-1&&v[i]>1)
			{
             cnt[v[i]]++;
			}
		}
		// for(ll d:re)
		// {
		// 	cout<<d<<" ";
		// }
		// cout<<endl;
	}
	ll fl=0;
	f(i,2,1000001)
	{
		if(isprime[i]==0&&cnt[i]>1)
		{
			fl=1;
		}
	}
	if(fl)
	{
		cout<<"setwise coprime"<<endl;
	}
	else
	{
		cout<<"pairwise coprime"<<endl;
	}
}
int main() {
	fast;
	fast_input;
	fast_output;
	// ll t;
	// cin>>t;
	// f(i,0,t)
	// {
        //  cout<<"Case #"<<i+1<<":"<<" ";
	     solve();
	// }
	return 0;
}