#include<bits/stdc++.h>
using namespace std;
#define int  long long 
#define speedrap ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0);
int be(int a,int b,int mod) {if(b == 0) return 1; if(b%2 == 1) return (a*be(a,b-1,mod))%mod; else return (be(a,b/2,mod)*be(a,b/2,mod))%mod;}
const int mod = 1e9 + 7;
#define PI 3.14159265359
#define pf push_front
#define pb push_back
#define bitcount __builtin_popcountll
#define setbitcnt __builtin_ctz
#define sc(a) scanf("%d", &a);
#define sz(s) (int)s.size()
#define eb emplace_back
#define pf push_front
#define mkp(x,y) make_pair(x,y)
#define all(x) x.begin(),x.end()
#define INF 0x3f3f3f3f
#define roundup(a,b)  std::cout << std::fixed;std::cout << std::setprecision(b); std::cout << a
const int siz = (1e6 + 10);
const int logi = 21;
const double epsilon = 1e-6;
bool cmp(const int &a,const int &b)
{
  return (abs(a-b)>1);
}

map<int,int> mp;

bool pairwise_coprime()
{
	for(int i = 2 ; i <= 1e6 ; i ++)
	{
		int cnt = 0;

		for(int j = i ; j <= 1e6 ; j+= i)
		{
			cnt += mp[j];
		}

		if(cnt > 1)
		{
			return false;
		}
	}

	return true;
}

signed main()
{
	#ifndef ONLINE_JUDGE
 	freopen("in.txt", "r", stdin);
 	freopen("out.txt", "w", stdout);
 	#else
// // online submission
 	#endif 
	speedrap
	int t;
	t = 1;
	//cin>>t;
	int val = 0;
	while(t--)
	{
		int n;
		cin>>n;
		int a[n];

		for(int i = 0 ; i < n ; i ++)
		{
			cin>>a[i];
			mp[a[i]]++;
		}

		bool setwise = false;

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

		if(g == 1)
		{
			setwise = true;
		}

		if(!pairwise_coprime() and setwise)
		{
			cout<<"setwise coprime";
			continue;
		}

		if(pairwise_coprime())
		{
			cout<<"pairwise coprime";
			continue;
		}

		cout<<"not coprime";
	}
}


