//	@Author : Gaurang_Kothiya

#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>  
#include <ext/pb_ds/tree_policy.hpp> 
#include <functional>
#include <bitset>
#include <cstdint>
#include <initializer_list>
 
using namespace std;
using namespace __gnu_pbds;  

#define data_set(type) tree<type,null_type,less<type>,rb_tree_tag,tree_order_statistics_node_update>
#define speed ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
#define int long long int
#define ld long double
#define f(i,x,n) for(int i=x;i<=n;i++)
#define fe(x,v)   for(auto &x :v)
#define nf(i,x,n) for(int i=n;i>=x;i--)
#define all(a)   a.begin(),a.end()
#define rall(a)  a.rbegin(),a.rend()
#define ook(num) order_of_key(num)
#define fbo(num) find_by_order(num)
#define gcd(a,b) __gcd(a,b)
#define bits(n) __builtin_popcountll(n)
#define pub push_back
#define pob pop_back
#define puf push_front
#define pof pop_front
#define RE rend()
#define RB rbegin()
#define B begin()
#define E end()
#define acc(v, x) accumulate(all(v), x)
#define p(a,b) pair<a,b>
#define F first
#define S second
#define sz size()
#define v(x) vector<x>
#define m(a,b) map<a,b>
#define u_m(a,b) unordered_map<a,b>
#define mm(a,b) multimap<a,b>
#define s(a) set<a>
#define us(a) unordered_set<a>
#define ms(a) multiset<a>
#define maxy __LONG_LONG_MAX__
#define miny INT_MIN
#define PI 3.14159265358979323846

const int inf= 1e9 +1;
const int inf64= 1e18 -1;
const int MOD= 1e9 +7;
const int MOD2= 998244353;

m(int,int) mp;

void Solve()
{
	int n;
	cin>>n;
	int a[n];
	s(int) st;
	
	f(i,0,n-1)
	{
		cin>>a[i];
		st.insert(mp[a[i]]);
	}
	//fe(x,st) cout<<x<<" ";
	//cout<<"\n";
	if(st.sz == n) cout<<"pairwise coprime";
	else
	{
		int gs=a[0];
		f(i,1,n-1) gs=gcd(gs,a[i]);
		if(gs==1) cout<<"setwise coprime";
		else cout<<"not coprime";
	}
}
 
signed main() 
{
	speed		

	//freopen("input.txt", "r", stdin);
	//freopen("output.txt", "w", stdout);	

	mp[1]=1;
	
	f(i,2,1000000)
	{
		if(mp[i]==0)
		{
			mp[i]=i;
			for(int j=2*i;j<=1000000;j+=i)
			{
				if(mp[j]==0) mp[j]=i;
			}
		}
	}

	int q=1;
	//cin>>q;
	
	while(q--)
	Solve();
		
	return 0;
} 