#include<bits/stdc++.h>
using namespace std;

// macro
#define rep(i,n) for(int i=0;i<n;i++)
#define all(v) v.begin(),v.end()
using ll = long long;
using P = pair<int,int>;

// code starts
int main()
{
	int n;
	cin >> n;
	vector<int> a(n);
	int i,j;
	rep(i,n) cin >> a[i];
	vector<int> nums(1000001,0);
	rep(i,n)
	{
		nums[a[i]]++;
	}
	bool pair_judge = true;
	for(i=2;i<=1000000;i++)
	{
		int times = 0;
		for(j=i;j<=1000000;j+=i)
		{
			if(nums[j] > 0) times++;
		}
		if(times >= 2) pair_judge = false;
	}
	if(pair_judge) cout << "pairwise coprime" << endl;
	else
	{
		int base = a[0];
		rep(i,n-1)
		{
			base = gcd(base,a[i+1]);
		}
		if(base == 1) cout << "setwise coprime" << endl;
		else cout << "not coprime" << endl;
	}
	
	//set or par, or other -> O(N)
}
