#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()
{
	int n;
	cin >> n;
	vector<int> a(n);
	rep(i, n)cin>>a[i];

	vector<int> check(2*1000000,0);
	set<int> s;
	bool flag = 1;
	auto kesu = [&](int i){ // i の倍数を表から消す
		if(s.count(i)) return;
		s.insert(i);
		for(int j = i; j < 2 * 1000000; j += i){
			check[j] = 1;
		}
	};
	rep(i,n){
		// 数を素因数分解する
		int N = a[i];
		if(check[N] == 1) flag = 0;
		if(s.count(N)) continue;
		check[N] = 1;
		for(int j = 2; j * j < N; j++){
			if(N % j == 0){
				while(N % j == 0){
					N /= j;
				}
				kesu(j);
			}
		}
		if(N != 1){
			if(s.count(N)) continue;
			else {
				check[N] = 1;
				kesu(N);
			}
		}
	}
	if(flag){
		cout << "pairwise coprime" << endl;
	} else {
		int G = 0;
		rep(i,n){
			G = __gcd(G,a[i]);
		}
		if(G == 1) cout << "setwise coprime" << endl;
		else {
			cout << "not coprime" << endl;
		}
	}
}
