#pragma GCC optimize(2)
#pragma G++ optimize(2)
#include<bits/stdc++.h>
#define si(a) scanf("%d",&a)
#define sl(a) scanf("%lld",&a)
#define sd(a) scanf("%lf",&a)
#define ss(a) scanf("%s",a)
#define ms(a) memset(a,0,sizeof(a))
#define repi(i,a,b) for(register int i=a;i<=b;++i)
#define repd(i,a,b) for(register int i=a;i>=b;--i)
#define reps(s) for(int i=head[s],v=e[i].to;i;i=e[i].nxt,v=e[i].to)
#define ce(i,r) i==r?'\n':' '
#define pb push_back 
#define all(x) x.begin(),x.end()
#define fi first
#define se second
#define pr(x) cout<<#x<<": "<<x<<endl
using namespace std;
typedef long long ll;
const int MAX_N=1e6+5;
inline int qi(){
    int f=0,fu=1; char c=getchar();
    while(c<'0'||c>'9'){ if(c=='-')fu=-1; c=getchar(); }
    while(c>='0'&&c<='9'){ f=(f<<3)+(f<<1)+c-48; c=getchar(); }
    return f*fu;
}
typedef pair<ll,int> P;
vector<ll> tmp;
ll mul(ll a,ll b,ll mod)
{
    ll res=0; a%=mod,b%=mod; 
    while(b){
        if(b&1){ res+=a; if(res>=mod) res-=mod; }
        b>>=1,a<<=1; if(a>=mod)  a-=mod;
    }
    return res;
}
ll qpow(ll x,ll n,ll mod){ ll res=1;while(n){ if(n&1) res=mul(res,x,mod); x=mul(x,x,mod),n>>=1; } return res; }
bool check(ll a,ll n){
    ll x=n-1,y; int t=0;
    while((x&1)==0) x>>=1,t++;
    x=qpow(a,x,n);
    repi(i,1,t){
        y=mul(x,x,n);
        if(y==1&&x!=1&&x!=n-1) return true;
        x=y;
    }
    return y!=1?true:false;
}
bool Miller_Robin(ll n)//???klog(n) k?????,???12
{
    if(n==2) return true;
    if(n==1||!(n&1)) return false;
    const int arr[12]={2,3,5,7,11,13,17,19,23,29,31,37};
    repi(i,0,11){
        if(arr[i]>=n) break;
        if(check(arr[i],n)) return false;
    }
    return true;
}
void Pollard_Rho(ll n)
{
  if(Miller_Robin(n)) { tmp.pb(n); return; }
  ll x,y,z,c,d; int i,j;
  while(true)
  {
    x=rand()*rand()%(n-1)+1,c=rand()*rand()%(n-1)+1;
    for(y=x,i=j=2; ; i++){
      x=(mul(x,x,n)+c)%n,z=x-y; 
	  if(z<0) z=-z; d=__gcd(z,n);
      if(d>1 && d<n) { Pollard_Rho(d),Pollard_Rho(n/d); return; }
      if(x==y) break;
      if(i==j) y=x,j<<=1;
    }
  }
}
vector<P> divi; 
map<ll,int> mp;
void Prime_Factorization(ll n)
{
	tmp.clear(),divi.clear(),mp.clear();
	if(n==1) { divi.pb(P(1,1)); return ; }
	Pollard_Rho(n);
	for(auto x:tmp) mp[x]++;
	for(auto x:mp) divi.pb(P(x.fi,x.se));
}
int a[MAX_N];
map<ll,int> rec;
int main()
{
	int n; si(n);
	repi(i,1,n) a[i]=qi();
	bool f1=true,f2=true;
	repd(i,n,1){
		Prime_Factorization(a[i]);
		for(auto x:divi){
			if(rec.count(x.fi)) f1=false;
			rec[x.fi]++;
		}
	}
	for(auto x:rec)if(x.se==n) f2=false;
	if(f1) puts("pairwise coprime");
	else if(f2) puts("setwise coprime");
	else puts("not coprime");
	return 0;
}