#pragma GCC optimize("Ofast")
#pragma GCC target("avx,avx2,fma")
#pragma GCC optimization ("unroll-loops")

// Use g++ compiler for this include to work.
#include <bits/stdc++.h>

using namespace std;

// Constants 
#define INF 1e18
#define EPsecond 1e-9
#define MOD 1000000007
 
// // for using in pairs
#define F first
#define S second
 
// Macros
#define all(x) begin(x), end(x)
 
// aliases
using ll = long long;
using ull = unsigned long long;
using ui = unsigned int;
using ld = long double;

// Temporary macro.
#define int long long

// Operator overloads.
/**
 * The type of element in the vector should have overload for << operator with ostream. 
 */
template<typename T>
ostream& operator<<(ostream &stream, vector<T> v)
{
	for (const auto &it : v)
		stream << it << " ";
	return stream;
}

/**
 * Both types in the pair should have overload for << operator with ostream. 
 */
template<typename T1, typename T2>
ostream& operator<<(ostream &ostream, pair<T1, T2> p)
{
	ostream << p.first << " " << p.second;
	return ostream;
}

// Utility functions.
void swap(int a, int b)
{
	int t = a;
	a = b;
	b = t;
}

///////////////////////////////////////////////////////////////////////

int gcd(int a, int b)
{
	if (!b)
		return a;
	return gcd(b, a % b);
}

map<int, int> getPrimeFactors(int n)
{
	map<int, int> ans;
	
	while(n % 2 == 0)
	{
		ans[2]++;
		n /= 2;
	}

  	for (int i = 3; i * i <= n; i = i + 2)  
    {  
        while (n % i == 0)  
        {  
            ans[i]++;
            n = n/i;  
        }  
    }  
  
    if (n > 2)  
    	ans[n]++;

    return ans;
}

void solve(int tc)
{
	int n;
	cin >> n;
	int a[n];
	for (int i = 0; i < n; i++)
		cin >> a[i];

	// check pairwise
	bool isPairWise = 1;
	map<int, int> prev

	prev = getPrimeFactors(a[n - 1]);

	for (int i = n - 2; i >= 0; i--)
	{
		map<int, int> curr = getPrimeFactors(a[i]);

		for (auto &it : prev)
		{
			if (it.F == 1) continue;
			if (curr[it.F])
			{
				isPairWise = false;
				break;
			}
		}

		for (auto &it : curr)
			prev[it.F] += it.S;
	}


	if (isPairWise)
	{
		cout << "pairwise coprime";
		return;
	}


	int g = a[0];
	for (int i = 1; i < n; i++)
	{
		g = gcd(g, a[i]);
	}

	if (g == 1)
	{
		cout << "setwise coprime";
		return;
	}

	cout << "not coprime";
}	

int32_t main()
{	
	#ifndef ONLINE_JUDGE
		freopen("input.txt", "r", stdin);
		freopen("output.txt", "w", stdout);
	#endif

	ios_base::sync_with_stdio(false);
	cin.tie(0);

	int t = 1;
	// cin >> t;		
	for (int i = 1; i <= t; i++)
	{
		solve(i);
	}

	return 0;
}
