/* Bismillahirrahmanirrahim */
/* Author : Jehian Norman Saviero (@Reiva5) */
#include <bits/stdc++.h>
 
// MACROS SAMPAH
#define Jehian using
#define Norman namespace
#define Saviero std
 
Jehian Norman Saviero;
 
// MACROS TYPE
typedef long l;
typedef long long ll;
typedef unsigned long ul;
typedef unsigned long long ull;
typedef long double ld;
typedef pair<int,int> pi;
typedef pair<l,l> pl;
typedef pair<ll,ll> pll;
typedef vector<int> vi;
typedef vector<l> vl;
typedef vector<ll> vll;
 
// MACROS FOR PRINT
#define nl printf("\n")
#define sp printf(" ")
 
// MACROS FOR ATTRIBUTE
#define fi first
#define se second
 
// MACROS FOR FUNCTION AND METHOD
#define eb emplace_back
#define pb push_back
#define pf push_front
#define ppb pop_back
#define ppf pop_front
#define ALL(x) (x).begin(), (x).end()
#define ALLN(x,n) (x), (x)+(n)
#define CUBE(x) (SQR(x)*(x))
#define SET(x,y) for (int _qwe = sizeof(x)/sizeof(x[0]); _qwe; ) x[--_qwe] = (y)
#define SQR(x) ((x)*(x))
#define SSORT(x,sz) sort(ALLN(x,sz))
#define RESET(x) memset((x), 0, sizeof(x))
#define VSORT(x) sort(ALL(x))
 
// MACROS READ INPUT
#define sci(x) scanf("%d", &x)
#define scl(x) scanf("%ld", &x)
#define scll(x) scanf("%lld", &x)
#define scul(x) scl(x)
#define scull(x) scll(x)

const int sz = 1e6+5;
int f[sz];
int A[sz];
int dat[sz];
int cnt[sz];

void PreCompute() {
	f[0] = 1;
	f[1] = 1;
	for (int i = 2; i < sz; ++i) {
		if (f[i] == 0) {
			for (int j = i; j < sz; j += i) {
				f[j] = i;
			}
		}
	}
}

int main() {
	PreCompute();
	int N;
	sci(N);
	RESET(dat);
	RESET(cnt);
	RESET(A);
	int GCD = 0;
	for (int i = 0; i < N; ++i) {
		sci(A[i]);
		GCD = __gcd(GCD, A[i]);
		int tmp = A[i];
		set<int> hit;
		while (tmp > 1) {
			hit.insert(f[tmp]);
			tmp /= f[tmp];
		}
		for (auto &it : hit) {
			++cnt[it];
		}
	}
	const int sz = 1e6+5;
	for (int i = 2; i < N; ++i) {
		for (int j = i; j < N; j += i) {
			dat[j] += cnt[i];
		}
	}
	int MAX = *max_element(ALLN(dat, N+1));
	if (MAX <= 1) {
		puts("pairwise coprime");
	} else if (GCD == 1) {
		puts("setwise coprime");
	} else {
		puts("not coprime");
	}
	return 0;
}