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

#define FAST ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0);

#define MAXX 500005
#define INF INT_MAX

#define PI   3.14159265358979323846264338327950

#define PB push_back
#define PF push_front
#define F first
#define S second

#define fixx(n) fixed << setprecision(n)

#define ll 	 long long

#define mod  1000000007


map<ll, bool> mp;

int main()
{
	FAST;
	int n;
	cin >> n;
	
	ll m ;
	bool flag = true;
	for(int i = 0; i < n; i ++){
		ll a;
		cin >> a;
		if(i == 0){
			m = a;
		}
		else{
			m = __gcd(m, a);
		}
		if(flag){
			for(int j = 2; j * j <= a; j ++){
			if(a % j == 0){
				int k1 = a / j;
				if(mp[k1] || mp[j]){
					flag = false;
				}
				mp[k1] = true;
				mp[j] = true;
			}
		}
			mp[a] = true;
		}
		
	}
	
	
	if(m != 1){
		cout << "not comprime"; return 0;
	}
	
	if(flag){
			cout << "pairwise coprime";
			return 0;
	}
		if(m == 1){
			cout <<  "setwise coprime";
			return 0;
		}
	
	
		
	
	
	return 0;
}