#pragma GCC optimize ("O3")
#pragma GCC target ("sse4")

#include <bits/stdc++.h>

using namespace std;

typedef pair<int, int> ii;
typedef vector<int> vi;
typedef long long ll;

#define f first
#define s second
#define pb push_back
#define lb lower_bound
#define ub upper_bound
#define sz(x) (int)x.size()
#define all(x) begin(x), end(x)
#define rsz resize

const int md = 1e9+7;
const ll inf = 1e18;
const int maxn = 1e6+5;

template<class T> void ckmin(T &a, T b) { a = min(a, b); }
template<class T> void ckmax(T &a, T b) { a = max(a, b); }

int isprime[maxn];

vector<int> primes;

void sieve()
{
	for(int i = 2; i<= 1e6; i++) isprime[i] = 1;
	for(int i = 2; i<= 1e6; i++)
	{
		if(!isprime[i]) continue;
		for(int j = i; j<= 1e6; j += i) isprime[i] = 0;
		primes.pb(i);
	}
}

int main()
{
	sieve();
	vector<bool> bist((int) primes.size(), false);

	vector<int> foo;
	int n;
	scanf("%d", &n);
	for(int i = 0; i< n; i++)
	{
		int x; scanf("%d", &x);
		foo.pb(x);
	} 
	int all = foo[0];
	for(int i = 1; i< n; i++)
	{
		all = __gcd(all, foo[i]);
	}

	bool bad = false;
	for(int i = 0; i< n; i++)
	{
		vector<int> divs;
		int bar = foo[i];
		int ptr = 0;
		while(ptr< (int) primes.size() && 1LL*primes[ptr]*primes[ptr]<= 1LL*bar)
		{
			if(bar%primes[ptr] == 0)
			{
				divs.pb(ptr);
			}
			while(bar%primes[ptr] == 0) bar /= primes[ptr];
			ptr++;
		}

		int pos = lower_bound(primes.begin(), primes.end(), bar)-primes.begin();

		divs.pb(pos);

		for(int x : divs) if(bist[x]) bad = true;

		for(int x : divs) bist[x] = true; 
	}

	if(!bad) printf("pairwise coprime\n");
	else if(all == 1) printf("setwise coprime\n");
	else printf("not coprime\n");
}