//Jai Shree Ram
//#include <iostream>
#include <bits/stdc++.h>
#define int long long
#define ld long double
#define loopi(stop) for(int i=0; i<stop; i++)
#define loopj(stop2) for(int j=0; j<stop2; j++)
#define loopk(stop3) for(int k=0; k<stop3; k++)
#define loopi1(stop) for(int i=1; i<=stop; i++)
#define loopj1(stop2) for(int j=1; j<=stop2; j++)
#define loopk1(stop3) for(int k=1; k<=stop3; k++)
#define loopse(kt,sstart, eend) for(int kt = sstart; kt<eend; kt++)
#define faster_io ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);
#define file_io_cf freopen("input.txt", "r", stdin); freopen("output.txt", "w", stdout);
#define p_b push_back
#define pii pair<int,int>
#define fi first
#define se second
#define prec_10 << fixed << setprecision(10)
#define DEB cout<<"DEBUG"<<'\n';
#define SRAND srand(time(0));

using namespace std;

int mod = 1000000007;

template <typename T>
void O(T x) {
	cout << x << '\n';
}

///////////////////////////////////CODE STARTS HERE///////////////////////////////////////////

vector <int> primes;

int32_t main() {

	faster_io
	// file_io_cf

	int n; cin >> n;
	int a[n];
	loopi(n) {
		cin >> a[i];
	}

	

	int sc = a[0];
	loopi(n - 1) {
		sc = __gcd(sc, a[i + 1]);
	}

	if (sc != 1) {
		O("not coprime");
		return 0;
	}


	//listing primes

	int cc = *max_element(a, a + n);

	bool prime[cc]; 
    memset(prime, true, sizeof(prime)); 
  
    for (int p=2; p*p<=cc; p++) 
    { 
        if (prime[p] == true) 
        { 
            for (int i=p*p; i<=cc; i += p) 
                prime[i] = false; 
        } 
    } 

	loopi(cc) {
		if (i > 1 && prime[i])
		{
			primes.p_b(i);
		}
	}


	int pc = 1;

	int tt = primes.size();

	loopi(tt) {
		int count =  0;
		loopj(n) {

			if (primes[i] <= a[j]) {
				if (a[j] % primes[i] == 0) {
					
					count++;
				}
			}

			if (count > 1) {
				pc = 0;
			}

		}
	}


	if (pc != 1) {
		O("setwise coprime");
		return 0;
	}

	O("pairwise coprime");



	return 0;
}