#include<bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef unsigned long long ull;
typedef vector<int> vi;
typedef vector<pair<int,int>> vpii;

#define F first
#define S second
#define PU push
#define PUF push_front
#define PUB push_back
#define PO pop
#define POF pop_front
#define POB pop_back

#define REP(i,a,b) for(int i=a; i<=b; i++)

void solve(int test_case) {
	int n;
	cin>>n;
	vector<bool> prime(1000001, true);
	prime[0]=false;
	REP(i,2,1000000) {
		if(prime[i]) {
			for(int j=i+i;j<=1000000;j+=i)prime[j]=false;
		}
	}
	vi arr;
	while(n--) {
		int val;
		cin>>val;
		if(!prime[val])arr.PUB(val);
	}
	
	bool pair = true,set=true;
	if(arr.size()>0){
		int gcp = arr.size()>1?arr[0]:1;
		for(int i=1;i<arr.size();i++) {
			gcp = __gcd(gcp,arr[i]);
		}
		if(gcp!=1)set=false;
		if(gcp) {
			for(int i=0;i<arr.size()&&pair;i++) {
				for(int j=i+1;j<arr.size()&&pair;j++) {
					if(__gcd(arr[i],arr[j])!=1)pair=false;
				}
			}
		}
	}
	if(pair&&set)cout<<"pairwise coprime";
	else if(set)cout<<"setwise coprime";
	else cout<<"not coprime";
}

int main() {
	
	////// FILE BASED IO////
	//freopen("in", "r", stdin);
	//freopen("out", "w", stdout);
	///////////////
	
	ios::sync_with_stdio(0);
	cin.tie(0);
	int t=1;
	//cin>>t;
	REP(i,1,t) {
		solve(i);
	}
}	
