#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;
const int A = 1000005;
int main()
{
	int n;
	cin >> n;
	vector<int> a(n);
	vector<int> c(A);
	rep(i,n){
		cin >> a[i];
		c[a[i]]++;
	}
	bool pairwise = false;
	for (int i = 2; i < A; i++){
		int cnt = 0;
		for (int j = i; j < A; j += i) {
			cnt += c[j];
		}
		if (cnt > 1) {
			cout << "pairwise coprime" << endl;
			return 0;
		}
	}
	int g = 0;
	rep(i,n) g = __gcd(g,a[i]);
	if (g == 1) {
		cout << "setwise coprime" << endl;
	} else {
		cout << "not coprime" << endl;
	}
}
