
// Problem : E - Coprime
// Contest : AtCoder - AtCoder Beginner Contest 177
// URL : https://atcoder.jp/contests/abc177/tasks/abc177_e
// Memory Limit : 1024 MB
// Time Limit : 2000 ms
// Powered by CP Editor (https://github.com/cpeditor/cpeditor)

#pragma GCC optimize("O2")
#include<bits/stdc++.h>
#include<ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#define fast ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL)
#define mod 1000000007
using namespace std;
using namespace __gnu_pbds;
typedef long long ll;
typedef tree<ll, null_type, less<ll>, rb_tree_tag, tree_order_statistics_node_update> indexed_set;
bool prim[1000001];
void sieve()
{
	memset(prim,true,sizeof prim);
	for(ll i=2;i<=1000000;i++)
	{
		if(prim[i])
		{
			for(ll j=i*i;j<=1000000;j+=i)
			{
				prim[j] = false;
			}
		}
	}
}
int main()
{
	fast;
	ll t = 1;
	// cin >> t;
	while (t--)
	{
		sieve();
		ll n;
		cin >> n;
		ll a[n];
		for(ll i=0;i<n;i++)
			cin>>a[i];
		ll gcd = a[0];
		for(ll i=1;i<n;i++)
		{
			gcd = __gcd(gcd,a[i]);
		}
		if(gcd != 1)
		{
			cout<<"not coprime\n";
			continue;
		}
		ll cnt = 0;
		for(ll i=0;i<n;i++)
		{
			if(prim[a[i]])
				cnt++;
		}
		if(cnt >= n-1)
		{
			cout<<"pairwise coprime\n";
		}
		else
		{
			cout<<"setwise coprime\n";
		}
	}
	return 0;
}
