#include<bits/stdc++.h>   
#include<tr1/unordered_map>
#define ll long long int  
#define mkp make_pair 
#define mod 1000000007 
#define maxn 1000002 
#define ff first
#define ss second 
using namespace std;      
bool isprime(ll n){    
    if(n==2||n==1)return true;
   if(n==0||n%2==0)return false; 
    
   for(int i=3;i*i<=n;i+=2)   
         if(n%i==0)return false; 
    return true;
}
int main(){    
  ios_base::sync_with_stdio(false);  
    
  cin.tie(NULL);      
  int n; 
  cin>>n;  
  ll res;
  ll arr[n];   
  for(int i=0;i<n;++i){  
       cin>>arr[i]; 
       if(i==0)res=arr[0]; 
       else res=__gcd(res,arr[i]);
    } 
  set<ll>s; 
  bool pc=true,sc=true,nc=true; 
  for(int i=0;i<n;++i){    
      for(int j=2;j*j<=n;++j){ 
       int cnt=0;
       while(arr[i]%j==0){  
           ++cnt;arr[i]/=j;
         }  
       if(cnt){   
           if(s.find(j)!=s.end()){ 
               pc=false;break; 
           } 
          s.insert(j);
       } 
    }
      
  }  
  if(res!=1)sc=false; 
  if(pc)cout<<"pairwise coprime"; 
  else if(sc)cout<<"setwise coprime"; 
  else cout<<"not coprime";
  return 0;
}