#include<bits/stdc++.h>
using namespace std;
using ll = long long;
const int N = 1e3+1;
bool is_prime[N];
vector<int> primes;
void soe()
{
	for(int i = 2; i < N;++i){
		is_prime[i] = true;
	}
	for(int i = 2; i*i<=N;++i){
		if(is_prime[i] == true){
			for(int j = i*i;j < N;j+=i){
				is_prime[j] = false;
			}
		}
	}
	for(int i = 2; i < N;++i){
		if(is_prime[i] == true)
			primes.push_back(i);
	}
}
int main()
{
	ios_base::sync_with_stdio(0);
	cin.tie(0);
	soe();
	int n;
	cin >> n;
	int arr[n];
	int gc = 1;
	for(int i = 0; i < n;++i){
		cin >> arr[i];
		if(i == 0)
			gc = arr[i];
		else
			gc = __gcd(gc,arr[i]);
	}
	int flag = 1;
	map<int,int> mp;
	for(int i = 0; i < (int)primes.size();++i){
		for(int j = 0; j < n;++j){
			if(arr[j]%primes[i] == 0){
				if(mp.count(primes[i]) != 0){
					flag = 0;
					break;
				}
				else
					++mp[primes[i]];
			}
		}
		if(flag == 0)
			break;
	}
	if(flag == 1)
		cout << "pairwise coprime\n";
	else if(gc == 1)
		cout << "setwise coprime\n";
	else
		cout << "not coprime\n";
}