#include <bits/stdc++.h>
 
using namespace std;

typedef long long ll;
const int mx=200009;
ll mod=1000000007;
  ll a[mx];
 /*
  int siz[mx];
  int par[mx];
  


  int parent(int i){
      while(i!=par[i]){
          i=par[i];
      }
      return i;
  }
  void unit(int x,int y){
      
      if(siz[x]<siz[y]){swap(x,y);}
     
          int par1=parent(x);
          int par2=parent(y);
      par[par2]=par1;
      siz[par1]+=siz[par2];
      
      
  }bool same(int a, int b) {
return parent(a) == parent(b);
}
*/


  bool prime[mx]; 

  
int main() {
    ios::sync_with_stdio(0);
    cin.tie(0);
  
  ll n,m;
  cin>>n;
 
  for(int i=1;i<=n;i++){
    cin>>a[i];
 if(i>1){
     gcdd=__gcd(gcdd,a[i]);
 }else{gcdd=a[i];}
  }
    memset(prime, true, sizeof(prime)); 
  ll yy=0;
    for (int p=2; p*p<=n; p++) 
    { 
       
        if (prime[p] == true) 
        { 
            // Update all multiples of p greater than or  
            // equal to the square of it 
            // numbers which are multiple of p and are 
            // less than p^2 are already been marked.  
            ll ans=0;
            for (int i=p*p; i<=n; i += p) {
                prime[i] = false;ans+=mp[i];}
            if(ans>1){
            yy=1;
                   break; 
            }
        } 
    } 
  if(yy==0)
  {
      cout<<"pairwise coprime";
  }else 
  if(gcdd==1){
         cout<<"setwise coprime";
  }else{
      
               cout<<"not coprime";
  }
    
}
