#include <bits/stdc++.h>
using namespace std;

typedef unsigned long long ll;
typedef pair<ll,ll> pi;
typedef vector <ll> vi;
typedef vector <pi> vpi;
#define f first
#define s second
#define FOR(i,s,e) for(ll i=s;i<=ll(e);++i)
#define DEC(i,s,e) for(ll i=s;i>=ll(e);--i)
#define pb push_back
#define all(x) (x).begin(), (x).end()
#define lbd(x, y) lower_bound(all(x), y)
#define ubd(x, y) upper_bound(all(x), y)
#define aFOR(i,x) for (auto i: x)
#define mem(x,i) memset(x,i,sizeof x)
#define fast ios_base::sync_with_stdio(false),cin.tie(0)
#define int ll
#define MOD 1000000007
#define maxn 1000010


int num[maxn], A[maxn], N;


int32_t main()
{
    cin>>N;
    FOR(i,1,N) cin>>A[i];
    
    FOR(i,0,maxn-1) num[i] = 0;
    
	FOR(i,1,N){
		int cur = A[i];
		FOR(j,2,sqrt(cur) + 1) {
			if (cur % j == 0) num[j]++;
			while (cur % j == 0) cur /= j;
		}
	}
    
    bool pairwise = 1;
    FOR(i,2,maxn - 1) if (num[i] > 1){
		pairwise = 0;
	}
    
    if (pairwise){
		cout<<"pairwise coprime";
		return 0;
	}
	
	int cur = A[1];
	FOR(i,2,N) cur = __gcd(cur, A[i]);
	
	if (cur == 1) cout<<"setwise coprime";
	else cout << "not coprime";
}
