#include <bits/stdc++.h>
#define IOS   ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0)
#define mp    make_pair
#define pb    push_back
#define F     first
#define pi 	  3.14159265358979323846
#define S     second
#define ll    long long
#define ld    long double
#define sz(s) (ll)s.size() 
#define vl    vector < ll >
#define pll   pair < ll, ll >
#define ml    map < ll, ll >
#define mod   1000000007
#define qe	  998244353
#define MAXN  500005 
#define mx    1000000
#define rep(i,a,b)  for(ll i=a;i<b;i++)
#define inv(i,a,b)  for(i=a;i>=b;i--)
#define all(a)  (a).begin(),(a).end()
using namespace std;
bool ch(ll a[],ll n,ll j){
	ll c=0;
	rep(i,0,n){
		if(a[i]%j==0)c++;
	}
	if(c>1)return false;
	return true;
}
int main(){
//	#ifndef ONLINE_JUDGE
//    if (fopen("input.txt", "r"))
//    {
//        freopen("input.txt", "r", stdin);
//        freopen("output.txt", "w", stdout);
//    }
//	#endif
	IOS;
	ll t,n,l;
	ll i,j,m,mn,q,d,x,y,ans=0,sum=0,r,p,k,c;
	string s,s1;
	cin>>n;
	ll a[n];
	rep(i,0,n)cin>>a[i];
	bool flag=true,flag1=true;
	for(j=2;j*j<=mx;j++){
		if(ch(a,n,j)==false)flag=false;
	}
	ans=a[0];
	rep(i,1,n){
		ans=__gcd(ans,a[i]);
	}
	if(ans!=1)flag1=false;
	if(flag)cout<<"pairwise coprime";
	else if(flag1)cout<<"setwise coprime";
	else cout<<"not coprime";
}