#include<bits/stdc++.h>
#define int long long
using namespace std;
const int maxin = (int)1e6+5;
vector<int>spf(maxin,1);
void seive(){
	for(int i=1;i<maxin;i++){
		spf[i] = i;
	}
	for(int i=4;i<maxin;i+=2){
		spf[i] = 2;
	}
	for(int i=3;i<maxin;i+=2){
		if(spf[i] == i){
			for(int j=i*i;j<maxin;j+=i){
				if(spf[j] == j){
					spf[j] = i;
				}
			}
		}
	}
}
void add(int x,map<int,int>&cnt){
	set<int>pf;
	while(x != 1){
		pf.insert(spf[x]);
		x /= spf[x];
	}
	for(auto i : pf){
		cnt[i] += 1;
	}
}
int32_t main(){
	#ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
#endif
    ios::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);
   	seive();
   	int n;
   	cin >> n;
   	vector<int>v(n);
   	int g = 0;
   	for(int i=0;i<n;i++)
   	{
   		cin >> v[i];
   		g = __gcd(g,v[i]); 
   	}
   	if(g != 1){
   		cout << "not coprime\n";
   		return 0;
   	}
   	map<int,int>cnt;
   	for(int i=0;i<n;i++){
   		add(v[i],cnt);
   	}
   	for(auto i : cnt){
   		if(i.second > 1){
   			cout << "setwise coprime\n";
   			return 0;
   		}
   	}
   	cout << "pairwise coprime";
    return 0;
}