#include <map>
#include <queue>
#include <cmath>
#include <ctime>
#include <vector>
#include <cstdio>
#include <complex>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <algorithm>
#include <tr1/unordered_map>
#define mo 1000000007
#define num(x) (x>='0' && x<='9')
typedef unsigned long long ull;
typedef long long ll;
using namespace std::tr1;
using namespace std;
int read(){
    int p=0, q=1;
    char ch=getchar();
    while (!num(ch))
        (ch=='-'?q=-1:0),
        ch=getchar();
    while (num(ch)) p=p*10+ch-'0', ch=getchar();
    return p*q;
}
int power(ll a, int b){
	ll c=1;
	while (b){
		if (b&1) c=c*a%mo;
		a=a*a%mo;
		b>>=1;
	}
	return c;
}
#define N 1000005
vector <int> g[N];
int flag[N], f[N], a[N], set[N], pairw[N];
int n;
int gcd(int a, int b){
	return (b?gcd(b, a%b):a);
}
int main(){
	f[1]=1;
	for (int i=2;i<N;i++)
		if (!f[i]){
			for (int j=2;j*i<N;j++)
				g[i*j].push_back(i),
				f[i*j]=1;
		}
	n=read();
	for (int i=1;i<=n;i++) a[i]=read();
	int suf=a[n];
	int pairw=1;
	for (int i=n;i;i--){
		suf=gcd(suf,a[i]);
		if (flag[a[i]]) pairw=0;
		if (!pairw) continue;
		flag[a[i]]=1;
		for (int j=0, m=g[a[i]].size();j<m;j++)
			if (flag[g[a[i]][j]]) pairw=0;
			else flag[g[a[i]][j]]=1;
	}
	if (pairw) printf("pairwise coprime");
	else if (suf==1) printf("setwrise coprime");
	else printf("not coprime");
	puts("");
    return 0;
}