
/*
#pragma GCC optimize("Ofast")
#pragma GCC optimize ("unroll-loops")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
*/

#ifdef LOCAL
#include "debug.h"
#else
#include<bits/stdc++.h>
using namespace std;
#define debug(x...)
#endif
 
/*
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
template<class T> 
using ordered_set= tree<T, null_type, 
		less<T>, 
		rb_tree_tag, tree_order_statistics_node_update> ;
template<class T> 		
using ordered_mset= tree<T, null_type, 
		less_equal<T>, 
		rb_tree_tag, tree_order_statistics_node_update> ;
		
*/
 
/*
 
PBDS
-------------------------------------------------
			0 based indexing
-------------------------------------------------			 
1) insert(value)
2) erase(value)
3) order_of_key(value) // Number of items strictly smaller than value
4) *find_by_order(k) : K-th element in a set (counting from zero)
 
*/
 
typedef long long ll;
typedef long double ld;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
 
//mt19937_64 rng(chrono::steady_clock::now().time_since_epoch().count());	

const int mx=1e6+5;

int mark[mx],koyta[mx];

void sieve()
{
	mark[1]=1;
	
	for(int i=2;i<mx;i++)
	{
		if(!mark[i])
		{
			for(int j=2*i;j<mx;j+=i) mark[j]=i;
		}
	}	
}

void factorize(int n)
{
	if(n==1) return;
	while(mark[n])
	{
		koyta[mark[n]]++;
		n/=mark[n];
	}
	koyta[n]++;
}

void solve()
{
	sieve();
	
	int n;
	cin>>n;
	
	int g=0;
	
	for(int i=0;i<n;i++)
	{
		int x;
		cin>>x;
		
		factorize(x);
		
		g=__gcd(g,x);
	}
	
	if(*max_element(koyta+1,koyta+mx)<=1) cout<<"pairwise coprime";
	else if(g==1) cout<<"setwise coprime";
	else cout<<"not coprime";
}		

int main()
{
	ios::sync_with_stdio(false);
	cin.tie(0); cout.tie(0);
	
	int testcase=1;
	//cin>>testcase;
	
	for(int i=1;i<=testcase;i++)
	{
		//cout<<"Case "<<i<<": ";
		solve();
	}
	
	#ifdef LOCAL
	cerr<<"\nTime elapsed: " << 1000.0 * clock() / CLOCKS_PER_SEC << " ms\n";
	#endif
	
	
	return 0;
}
