#include<bits/stdc++.h>
using namespace std;
const int N = 1e6;
int prime[N],a[N+5],vt[N+5];
vector<int> v[N+5];
bool vis[N+5];
void E_sieve(){
	for(int i = 2; i*i <= N; i++){
		if(!vis[i]){
			for(int j = i*i; j <= N; j += i){
				vis[j] = true;
				v[j].push_back(i);
			}
		}
	}
	for(int i = 2; i <= N; i++){
		if(!vis[i]){
			v[i].push_back(i);
		}
	}
}
int main ()
{
	E_sieve();
	int n,flag1 = 0,gd;
	cin >> n;
	for(int i = 1; i <= n; i++){
		cin >> a[i];
		if(i == 1)
			gd = a[i];
		else if(gd != 1){
			gd = __gcd(gd,a[i]);
		}
		if(!flag1){
			for(int j = 0; j < v[a[i]].size(); j++){
				if(vt[v[a[i]][j]] == 1){
					flag1 = 1;
				}
				vt[v[a[i]][j]] = 1;
			}	
		}
	}
	if(gd == 1 && flag1 == 0){
		cout << "pairwise coprime" << endl;
	}
	else if(gd == 1 && flag1 == 1){
		cout << "setwise coprime" << endl;
	}
	else
		cout << "not coprime" << endl;
	return 0;
}