#include <bits/stdc++.h>
#define int long long
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
using namespace std;
constexpr int MOD = 1000000007;
constexpr int INF = numeric_limits<int>::max() / 2;
typedef pair<int,int> P;
using Graph = vector<vector<int>>;
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }
const long double PI = acos(-1.0);
// cout << fixed << setprecision(14);
 
signed main(){
	cin.tie(nullptr);
	ios::sync_with_stdio(false);

	int N;
	cin >> N;
	vector<int> A(N);
	rep(i,N){
		cin >> A[i];
	}
	int gcd1 = A[0];
	rep(i,N){
		if(i==0) continue;
		gcd1 = gcd(gcd1, A[i]);
	}
	if(gcd1 != 1) cout << "not coprime" << endl;
	else{
		sort(A.begin(), A.end());
		bool prime[1000010]{};
		for(int i=2;i<1000005;i++){
			prime[i] = true;
		}
		for(int i=2;i<=1000000;i++){
			if(prime[i]){
				int ans = 0;
				for(int j=i+i;j<=1000000;j+=i){
					prime[j] = false;
					if(j == (*lower_bound(A.begin(), A.end(), j))) ++ans;
				}
				if(ans >= 2){
					cout << "setwise coprime" << endl;
					return 0;
				}
			}
		}
		cout << "pairwise coprime" << endl;
	}
}