#include <bits/stdc++.h>
using namespace std;
typedef long long int lld;
typedef pair<int,int> pi;
typedef pair<lld,lld> pl;
typedef pair<int,lld> pil;
typedef pair<lld,int> pli;
typedef vector<int> vit;
typedef vector<vit> vitt;
typedef vector<lld> vlt;
typedef vector<vlt> vltt;
typedef vector<pi> vpit;
typedef vector<vpit> vpitt;
typedef long double ld;
#define x first
#define y second
#define pb push_back
#define all(v) v.begin(), v.end()
#define sz(x) (int)x.size()
#define mk(a,b) make_pair(a,b)
bool isrange(int y,int x,int n,int m){
	 if(0<=y&&y<n&&0<=x&&x<m) return true;
	 return false;
}
int dy[4] = {1,0,-1,0},dx[4]={0,1,0,-1},ddy[8] = {1,0,-1,0,1,1,-1,-1},ddx[8] = {0,1,0,-1,1,-1,1,-1};
int ck[1000100];
int main(void){
	int n;
	scanf("%d",&n);
	bool suc = true;
	if(n>100000) suc = false;
	int kk = 0;
	for(int e=0;e<n;e++){
		int r;
		scanf("%d",&r);
		kk = __gcd(kk,r);
		if(r==1) continue;
		if(suc){
			int nn = sqrt(r);
			int tmp = r;
			for(int p=2;p<=nn;p++){
				if(tmp%p==0){
					while(tmp%p==0) tmp/= p;
					if(ck[p]){
						suc=  false;
						break;
					}
					ck[p] = 1;
				}
			}
		}
	}
	if(suc) printf("pairwise coprime");
	else{
		if(kk==1) printf("setwise coprime");
		else printf("not coprime");
	}
	return 0;
}
