#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;  
 /*  for(ll i=2;i<=maxn;++i)isprime[i]=1;

    isprime[0]=0; 
    isprime[1]=0;
    for(ll i=2;i*i<=maxn;++i){  
            if(isprime[i]){   
              for(ll j=i*i;j<=maxn;j+=i) 
                    isprime[j]=0;
             }
         }
      */

  ll arr[n];
  ll res;
  for(int i=0;i<n;++i){
     cin>>arr[i];   
     if(i==0)res=arr[0]; 
     else 
     res=__gcd(res,arr[i]);
  }   
 int cnt=0; 
 bool one=0;
 for(int i=0;i<n;++i){  
      if(isprime(arr[i])==0)++cnt; 
      if(arr[i]==1)one=true;
  }  
 if(n>2){
 if(cnt<=1){  
     cout<<"pairwise coprime\n"; 
 }  
 else if(cnt>1&&res==1) 
      cout<<"setwise coprime\n"; 
 else  
      cout<<"not coprime\n";

 } 
 else {  
        if(cnt==0)cout<<"pairwise coprime\n";
        else if(cnt>0&&one)cout<<"pairwise coprime\n"; 
        else 
         cout<<"not coprime\n";
   }   

  
  return 0;
}