#include<bits/stdc++.h>

#define gcd(a,b)     __gcd(a,b)
#define lcm(a,b)     (a*(b/gcd(a,b)))

#define pb   push_back
#define endl "\n"

#define ll  long long
#define ull unsigned long long

#define W(t)            while(t--)
#define rep(i,n)      for(i = 0; i < n; i++)
#define repit(it,type)  for(auto it = type.begin(); it != type.end(); it++)
#define IOS ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
using namespace std;

bool is_prime(int n)
{
	for(int i = 2; i <= sqrt(n); i++)
		if(n%i==0)
			return false;
	return true;
}
int main()
{
	IOS

	ll n, i;
	cin >> n;
	ll a[n];
	ll ans = 0, res = 0,even=0,odd=0;

	for (i = 0; i < n; i++)
		cin >> a[i];
	ans = a[0];
	for (i = 1; i < n; i++)
	{
		ans = gcd(a[i], ans);
		if(a[i]%2==0)
			even++;
		if(!is_prime(a[i]))
			odd++;


	}
	if (even<=1)
		cout << "pairwise coprime\n";
	else if (odd>1 && ans==1)
		cout << "setwise coprime\n";
	else
		cout << "not coprime\n";
	return 0;
}