#include <bits/stdc++.h>
using namespace std;
// Macros for easier access
#define ll long long
#define endl '\n'
#define F first
#define S second
#define umap unordered_map
#define uset unordered_set
#define test ll cases; cin>>cases; for(ll testCase = 1; testCase <= cases; testCase++)   //test cases
#define fill(name, val) memset(name, val, sizeof(name));
#define mop(a, op, b)    (a%mod op b%mod)%mod
#define error(x) fixed<<setprecision(x) //cout<<error(5)<<someDouble    -> example - 3.14159
#define vll vector<ll>
#define vvll vector<vll>
#define pll pair<ll, ll>
#define get(a, n)    for(ll i = 0; i < n; i++)    cin>>a[i];
#define boost ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);
#define debug(x) cerr << #x << " : " << (x) << endl
// Constants
#define MX 100001
#define mod 1000000007LL
#define inf 1000000000000000000LL
void init(){
	boost;
	#ifndef ONLINE_JUDGE
		freopen("input.txt", "r", stdin);
		freopen("output.txt", "w", stdout);
	#endif
}

/*	Author: 🆉🅴🅽🅾🅻🆄🆂	*/

vll primeSieve(ll n = MX){
	vll primes;
	bool nums[n];   fill(nums, true);
	primes.push_back(2);
	for(ll i = 4; i < n; i += 2)   nums[i] = false;
	for(ll i = 3; i < n; i += 2){
		if(nums[i]){
			primes.push_back(i);
			for(ll j = i*i; j < n; j += i) nums[j] = false;
		}
	}
	return primes;
}

int main(){
	init();
	vll primes = primeSieve(1000);
	ll n;	cin>>n;	ll a[n];	get(a, n);
	ll g = a[0];
	umap<ll, ll> m;
	for(auto x : a){
		g = __gcd(g, x);
		ll rt = sqrt(x);
		for(auto y : primes){
			if(y > x)	break;
			if(x % y == 0)	m[y]++;
			if(x / y != y)	m[x/y]++;
		}
	}
	if(g != 1)	cout<<"not coprime";
	else{
		bool pc = 1;
		for(auto x : m)	if(x.F != 1 && x.S > 1)	pc = 0;
		if(pc)	cout<<"pairwise coprime";
		else	cout<<"setwise coprime";
	}
}