#include<bits/stdc++.h>
#define ll long long
#define clr(x,i) memset(x,i,sizeof(x))
using namespace std;
const int N=1000005;
inline int read()
{
    int x=0,f=1; char ch=getchar();
    while(ch<'0'||ch>'9') {if(ch=='-') f=-1; ch=getchar();}
    while(ch>='0'&&ch<='9') {x=x*10+ch-'0',ch=getchar();}
    return x*f;
}
vector<int> d[N];
int n,a[N],cnt[N],vis[N],vis2[N];
void solve()
{
	n=read();
	for(int i=1; i<=n; i++) a[i]=read(),cnt[a[i]]++;
	int g=a[1];
	for(int i=2; i<=n; i++) {
		g=__gcd(g, a[i]);
	}
	if(g > 1) {puts("not coprime"); return;}
	for(int i=2; i<=1000000; i++) if(!vis[i]) {
		d[i].push_back(i);
		for(int j=i+i; j<=1000000; j+=i) {
			vis[j] = 1;
			d[j].push_back(i);
		}
	}
	int fl=1;
	for(int i=1; i<=n; i++) if(!vis[a[i]]) {
		for(auto x:d[a[i]]) {
			if(vis2[x]) { fl=0; break; }
			vis2[x] = 1;
		}
		if(!fl) break;
	}
	if(fl) puts("pairwise coprime");
	else puts("setwise coprime");
}
int main()
{
	int T=1;
	while(T--) solve();
}