// C++ implementation of the approach 
#include <bits/stdc++.h> 
using namespace std; 
# define rep(i,n) for(int i=0;i<n;++i)
# define gcd __gcd

const int N=1e6+5;
int cnt[N];

int main(){ 	
	int n;
	cin>>n;
	int a[n];
	int g=0;
	rep(i,n){
		cin>>a[i];
		g=gcd(g,a[i]);
	}
	bool ok=1;
	for(int i=0;i<n;i++){
		for(int j=2;j*j<=a[i];j++){
			if(a[i]%j==0){
				if(cnt[j]){
					ok=0;
					break;
				}
				cnt[j]++;
			}
		}
	}
	if(ok){
		cout<<"pairwise comprime";
	}
	else if(g==1){
		cout<<"setwise comprime";
	}
	else cout<<"not coprime";
} 
