#include<bits/stdc++.h>
#include<iomanip>
#define fast {ios_base::sync_with_stdio(false);cin.tie(NULL);}
#define mxn 1000003
#define mod 1000000007
#define ld long double
#define pb push_back
#define inf 1e18
#define fi first
#define se second
typedef long long int ll;
using  namespace std;
int main(void){
	#ifndef ONLINE_JUDGE
	freopen("input1.txt","r",stdin);
	freopen("output.txt","w",stdout);
	#endif
	fast;
	int n,i,bad=0;
	cin>>n;
	int a[n];
	int pre[n+1]={0},suf[n+5]={0};
	for(i=0;i<n;i++){
		cin>>a[i];
		pre[i+1]=__gcd(pre[i],a[i]);
	}
	for(i=n-1;i>=0;i--){
		suf[i+1]=__gcd(suf[i+2],a[i]);
	}
	for(i=1;i<=n;i++){
		if(__gcd(pre[i-1],suf[i+1])!=1)
		bad=1;
	}
	if(bad){
		if(pre[n]==1)
		cout<<"setwise coprime";
		else
		cout<<"not coprime";
	}
	else
	cout<<"pairwise coprime";
}
