#include<bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
using namespace __gnu_pbds;
using namespace std;

typedef long double ld;
typedef long long ll;
typedef pair<int,int> ii;
typedef tree<ii,null_type,less<ii>,rb_tree_tag,tree_order_statistics_node_update> indexed_set;
// *st.find_by_order(index), 0-based
// order_of_key(e)

const int mx=1777;
const int mx2=1e6+777;
bool flag[mx];
vector<int> p;
int factor[mx2];


bool pc(vector<int> A) {
	for (auto x : A) {
		for (auto d : p) {
			if(d*d>=x) break;
			bool ok=false;
			while(x%d==0)
				x/=d, ok=true;
			if(ok) factor[d]++;
		}
	}
	for (int i=0; i<mx2; i++)
		if(factor[i]>1)
			return false;
	return true;
}

bool sc(vector<int> &A) {
	int g=A[0];
	for (auto x : A)
		g=__gcd(g,x);
	return g==1;
}

int main() {
	cin.tie(0); cout.tie(0); ios_base::sync_with_stdio(0);
	for (int i=0; i<mx; i++)
		flag[i]=true;
	flag[0]=flag[1]=false;
	for (int i=2; i*i<mx; i++)
		if(flag[i])
			for (int j=i; j*i<mx; j++)
				flag[i*j]=false;
	for (int i=0; i<mx; i++)
		if(flag[i])
			p.push_back(i);
	int N; cin>>N;
	vector<int> A(N);
	for (int i=0; i<N; i++)
		cin>>A[i];
	if(pc(A)) cout<<"pairwise coprime\n";
	else if(sc(A)) cout<<"setwise coprime\n";
	else cout<<"not coprime\n";
	return 0;
}