#include<bits/stdc++.h>
using namespace std;
#define ll long long int 
 
const ll mod = 1E9 + 7;

int main(){
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
	int N; cin >> N;
	int i, j;
	vector<int> a(N); for(i = 0; i < N; i++) cin >> a[i];
	int r = a[0];
	for(i = 0; i < N; i++) r = __gcd(r, a[i]);
	map<int, int> mp;
	for(i = 0; i < N; i++) mp[a[i]]++;
	int f = 0;
	for(i = 0; i < N; i++)
		if(mp[a[i]] > 1)
			f = 1;
	int m = *max_element(a.begin(), a.end());
	for(i = 2; i <= m; i++){
		int cnt = 0;
		for(j = i; j <= m; j += i){
			if(mp.find(i) != mp.end())
				cnt += mp[i];
		}
		if(cnt >= 2)
			f = 1;
	}
	if(f == 1){
		if(r == 1)
			cout<<"setwise corpime";
		else
			cout<< "not coprime";
	}
	else cout<<"pairwise coprime";
}
