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

#define fast_io ios_base::sync_with_stdio(false); cin.tie(nullptr); cout.tie(nullptr);
#define cout_precision cout.setf(ios::fixed); cout.precision(32);
#define clr(a) memset(a,0,sizeof(a))
#define umap unordered_map
#define uset unordered_set
#define fr first
#define sc second
#define pb push_back
#define pf push_front
#define M int(1e9+7)
#define endl '\n'
#define largest(a,b,c) (a>b?(a>c? a:c):(b>c? b:c))
#define smallest(a,b,c) (a<b?(a<c? a:c):(b<c? b:c))

using ll = int64_t; using vll = vector<ll>; using vvll = vector<vll>;
using pll = pair<ll, ll>; using vpll = vector<pll>; using vvpll = vector<vpll>;

int n;
int arr[10000000];
string res = "not coprime";

void f1(){
	int g = arr[0];
	for(int i=1; i<n; i++)	g = __gcd(g,arr[i]);
	if(g != 1)	return ;

	bool flag = 1;
	for(int i=1; i<n; i++){
		if(__gcd(arr[0] , arr[i]) != 1){
			flag= 0;	break;
		}
	}


	if(flag)	res = "pairwise coprime";
	if(!flag )	res = "setwise coprime";
}


int main(){
	fast_io; cout_precision;
	clr(arr);
	cin >> n;
	for(int i=0; i<n; i++)	cin >> arr[i];
	
	f1();

	cout << res <<endl;

	return 0;
}
