#include <bits/stdc++.h>

using namespace std;
using ll =long long;
typedef pair<int,int> P;
#define SORT(a) sort((a).begin(),(a).end())
#define REV(a) reverse((a).begin(),(a).end())
#define For(i, a, b)    for(int i = (a) ; i < (b) ; ++i)
#define rep(i, n)       For(i, 0, n)
#define debug(x)  cerr << #x << " = " << (x) << endl;
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return true; } return false; }
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return true; } return false; }

void coY() {cout <<"Yes"<<endl;}
void coN(){cout <<"No"<<endl;}

//Write From this Line

//const ll mod = 1e9+7;
//const ll mod = 998244353;
int main()
{
	ll n;
	cin >>  n;
	vector<ll> a(n);
	rep(i,n) cin >> a[i];
	SORT(a);
	vector<ll> check(1000005,0);
	int flag = 1;
	int nflag = 1;
	vector<ll> done(1000005,0);
	rep(i,n){
		//pairwise じゃないならflag を 0にする
		// a[i]の素因数の倍数を表から消す
		if(check[a[i]] >= 1) flag = 0;
		for(int j = 2; j * j < a[i]; j++){
			// ルートnまでが素因数かどうか
			if(a[i] % j == 0){
				if(done[j]){
					continue;
				} else {
					done[j] = 1;
					for(int k = j; k < 1000005; k += j){
						check[k] ++;
					}
				}
			}
		}
	}
	// 全部のgcdが1か見ればいい
	ll G = a[0];
	rep(i,n){
		G = __gcd(G,a[i]);
	}
	if(flag == 1){
		cout << "pairwise coprime" << endl;
	} else if(G == 1){
		cout << "setwise coprime" << endl;
	} else {
		cout << "not coprime" << endl;
	}
}
