#include<bits/stdc++.h>
using namespace std;
using ll = long long;
int main()
{
	ios::sync_with_stdio(0);cin.tie(0);
	int n;
	cin >> n;
	vector<ll> v(n);
	
	for(auto &x:v)cin >> x;
	ll res = v[0];
	for(int i = 1;i < n;i++)
	{
		res = gcd(res, v[i]);
		if(res == 1)
			break;
	}
	if(res != 1)
		cout << "not coprime";
	else
	{
		bool f = true;
		for(int i = 0;i < n-1;i++)
			if(gcd(v[i], v[i+1]) != 1)
			{	
				f = false;
				break;
			}
		if(f)
			cout << "pairwise coprime";
		else
			cout << "setwise coprime";
	}
}
