//---------------------------------------------------------MANAS UNIYAL---------------------------------------------------------
//                                                        NEVER  GIVE  UP
#include<bits/stdc++.h>
using namespace std;
#define fast ios_base::sync_with_stdio(false);	cin.tie(NULL);	cout.tie(NULL);
#define ll long long
#define pb push_back
#define fi first 
#define se second
#define pii pair<ll,ll>
#define INF 0x3f3f3f3f
#define LINF 98765432123456789
#define testcases() ll t; cin>>t; while(t--)
#define debug cout<<"Hello\n";
#define debug1(x) cout<<#x<<" "<<x<<"\n";
#define debug2(x,y) cout<<#x<<" "<<x<<" "<<#y<<" "<<y<<"\n";
#define debug3(x,y,z) cout<<#x<<" "<<x<<" "<<#y<<" "<<y<<" "<<#z<<" "<<z<<"\n";
#define debug4(w,x,y,z) cout<<#w<<" "<<w<<" "<<#x<<" "<<x<<" "<<#y<<" "<<y<<" "<<#z<<" "<<z<<"\n";
#define rep(i,start,end) for(ll i=start;i<end;i++)
#define sz(x) (ll)((x).size())
#define all(x) (x).begin(),(x).end()
#define rall(x) (x).rbegin(),(x).rend()
//------------------------------------------------------------------------------------------------------------------------------
#define N 1000005
vector<int> v(N);
map<int,int> mp;
bool func(vector<int> &v) {
	for(int i=2;i*i<N;i++) {
		if(!v[i])
			continue;
		int cnt = 0;
		if(mp.find(i) != mp.end())
			++cnt;
		for(int j=i*i;j<N;j+=i) {
			if(mp.find(j) != mp.end()) {
				++cnt;
				if(cnt == 2)
					return false;
			}
			v[i] = 0;
		}
	}
	return true;
}
int main()
{
	
	#ifndef ONLINE_JUDGE
	freopen("C:/Users/DELL/Desktop/input.txt", "r", stdin);
	#endif

	fast;
	int n,x;
	cin>>n;
	int gcd = 0;
	bool ok = true;
	for(int i=0;i<n;i++) {
		cin>>x;
		gcd = __gcd(x,gcd);
		mp[x]++;
		if((x > 1) && (mp[x] > 1))
			ok = false;
	}
	for(int i=0;i<N;i++)
		v[i] = i;
	if(gcd != 1) {
		cout<<"not coprime";
	} else {
		if(ok && func(v))
			cout<<"pairwise coprime";
		else
			cout<<"setwise coprime";
	}
	return 0;
}
