#include<bits/stdc++.h>
using namespace std;
#define LL long long

int main(){
	// sengen
	int n;
	// nyuryoku
	cin >> n;
	int a[n];
	int g;
	int b[1000001] = {};
	for(int i=0;i<n;i++){
		cin >> a[i];
		b[a[i]]++;
		if(i == 0){
			continue;
		}else if(i == 1){
			g = gcd(a[i],a[i-1]);
		}else{
			g = gcd(a[i],g);
		}
	}
	// keisan
	if(g == 1){
		cout << "pairwise coprime" << endl;
		return 0;
	}
	int ans = 1;
	for(int i=2;i<=1000000;i++){
		int tmp = 0;
		for(int j=1;i*j<=1000000;j++){
			tmp += b[i*j];
		}
		ans = max(ans,tmp);
	}
	
	if(ans == n){
		cout << "not coprime" << endl;
	}else{
		cout << "setwise coprime" << endl;
	}
	// syutsuryoku
}