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

typedef long long ll;
const ll mod=1e9+7;
const ll N=1e6+1;
const ll INF=1e10;

int main(){
	ios_base::sync_with_stdio(0);
	cin.tie(NULL);
	int n;
	cin>>n;
	vector<int> a(n);
	for(int &i:a) cin>>i;
	set<int> s;
	int g=a[0];
	bool cp=true;
	for(int i=0;i<n;i++){
		g=__gcd(a[i],g);
		if(!cp) continue;
		for(int j=2;j*j<=a[i];j++){
			if(a[i]%j==0){
				if(s.find(a[i]/j)==s.end() and s.find(j)==s.end()){
					s.insert(a[i]/j);
					s.insert(j);
				}
				else{
					cp=false;
					break;
				}
			}
		}
		if(s.find(a[i])!=s.end()) s.insert(a[i]);
		else cp=false;
	}
	if(cp) cout<<"pairwise coprime";
	else if(g==1) cout<<"setwise coprime";
	else cout<<"not coprime";
}  
