#include<bits/stdc++.h> 
using namespace std; 
#define ll long long 
#define sort(v) sort(v.begin(),v.end()) 
#define pb push_back
vector<ll>sv;
ll ar[1000000+9]={0}; 
void seiv() { 
ll n=1500,i,j; 
ar[1]=1; 
for(i=4;i<=n;i+=2)ar[i]=1; 
for(i=3;i<=n;i+=2) 
{ if(ar[i]==0) 
{ for(j=i*i;j<=n;j+=i*2)ar[j]=1; }
 } 
for(i=2;i<=n;i++){
        if(ar[i]==0)sv.pb(i);
}
}
int main()
{
  seiv();
  ll a,b,c,d,e,i,j,k,l;
  vector<ll>v;
  cin>>a;
  for(i=1;i<=a;i++)
  {
  cin>>b;v.pb(b);
  if(i==1)c=__gcd(b,b);
 else c=__gcd(c,b);
  }
    if(c!=1){
cout<<"not coprime\n";}
 else{c=0;d=0;
  for(i=0;i<sv.size();i++)
 {c=0;
 for(j=0;j<v.size();j++)
 {//cout<<sv[i];
  if(v[j]%sv[i]==0){c++;}
  if(c>1){d=1;break;}
 }
if(d==1)break;
 }
if(d==1)cout<<"setwise coprime\n";
else  cout<<"pairwise coprime\n";
}
}