#include<bits/stdc++.h>
using namespace std;
const int N=2e6+10;
int a[N];
bool cmp(int x,int y){
	return x>y;
}
int main(){
	int n,f=0;
	cin>>n;
	for(int i=1;i<=n;i++)
		cin>>a[i];
	sort(a+1,a+1+n,cmp);
	for(int i=1;i<n;i++)
		a[i+1]=__gcd(a[i],a[i+1]);
	for(int i=2;i<=n;i++)
		if(a[i]!=1) f=1;
	if(a[n]==1&&f==0) cout<<"pairwise coprime";
	else if(a[n]==1&&f==1) cout<<"setwise coprime";
	else cout<<"not coprime\n";
	return 0;
}