#include<bits/stdc++.h>
//#pragma GCC optimize("Ofast","no-stack-protector","unroll-loops")
//#pragma GCC target("sse,sse2,sse3,ssse3,sse4,sse4.2,popcnt,abm,mmx,avx")
//#include<bits/extc++.h>
//using namespace __gnu_pbds;
using namespace std;
#define int long long
#define F(i,L,R) for(int i=L;i<R;++i)
#define FE(i,L,R) for(int i=L;i<=R;++i)
#define getI(a) scanf("%lld",&a)
#define getII(a,b) scanf("%lld%lld",&a,&b)
#define getIII(a,b,c) scanf("%lld%lld%lld",&a,&b,&c)
#define VgetI(n) int (n); scanf("%lld",&(n))
#define VgetII(n,m) int (n),(m); scanf("%lld%lld",&(n),&(m))
#define VgetIII(n,m,k) int (n),(m),(k); scanf("%lld%lld%lld",&(n),&(m),&(k))
#define debug(x) cout<<(#x)<<"="<<x<<"\n";
#define qq cout<<"QQ\n";
#define pb push_back
#define pii pair<int,int>
#define mp make_pair
#define f first
#define s second
#define INF 2000000000
int n,a[1000005];
set<int> appear;
bool decompose(int x){
	for(int i=2;i*i<=x;i++) if(x%i==0){
		if(appear.find(i)!=appear.end()) return 0;
		while(x%i==0) x/=i;
		appear.insert(i);
	}
	return 1;
}
main(){
	while(~getI(n)){
		appear.clear();
		F(i,0,n) getI(a[i]);
		bool pairwise=1;
		int gcdOfAll=a[0];
		F(i,1,n) gcdOfAll=__gcd(gcdOfAll,a[i]);
		F(i,0,n){
			bool ok=decompose(a[i]);
			pairwise&=ok;
		}
		if(pairwise&&gcdOfAll==1) puts("pairwise coprime");
		else if(gcdOfAll==1) puts("setwise coprime");
		else puts("not coprime");
	}
}