#include<bits/stdc++.h>
#include <unistd.h>
using namespace std;
#define nl cout<<"\n"
#define endl '\n'
#define pb push_back
#define se second
#define fi first
#define int long long 
#define pi pair<int,int>
#define vpi vector<pi>
#define vvpi vector<vpi>
#define fio ios_base::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL)
#define For(i,n) for(int i=0;i<n;i++)
#define Forn(i,a,n) for(int i=a;i<n;i++)
#define pie =3.14159265358979323846264338327950;
const int mod= 1e9+7;



void solve(){
	fio;
	int n;
	cin>>n;
	int ar[n];
	For(i,n){
		cin>>ar[i];
	}
	int prd=1;
	for(int i=0;i<n;i++){
		prd*=ar[i];
	}
	int lcm=1;
	for(int i=0;i<n;i++){
		lcm= lcm*ar[i]/__gcd(lcm,ar[i]);
	}
	if(prd==lcm){
		cout<<"pairwise coprime"<<endl;
		return ;
	}
	int g=ar[0];
	for(int i=1;i<n;i++){
		g= __gcd(g,ar[i]);
	}
	if(g==1) cout<<"setwise coprime"<<endl;
	else cout<<"not coprime"<<endl;
	
}


int32_t main(){
	fio;
	//freopen("input.txt", "r", stdin);
	//freopen("output.txt", "w", stdout);
	int t=1;
	//cin>>t;
	for(int i=1;i<=t;i++){ 
		//cout<<"Case #"<<i<<": ";
		solve();
	}
	return 0;
}
