#include <bits/stdc++.h> 
using namespace std; 
#define ll long long int
#define pb push_back             
#define se second                
#define fi first  
#define be begin()
#define en end()
#define all(v) v.be, v.en
template<typename... T> void pp(T... args) { ((cout << args << " "), ...); cout<<"\n"; }
template<typename... T> void po(T... args) { ((cout << args << " "), ...); cout<<""; }

 vector<int> pr;
 bool isPrimeNumber(int n){
   if (n <= 1)
      return false;
   if (n <= 3)
      return true;
   if (n % 2 == 0 || n % 3 == 0)
      return false;
   for (int i = 5; i * i <= n; i = i + 6)
      if (n % i == 0 || n % (i + 2) == 0)
         return false;
   return true;
}
void printPrime(int n){
   for (int i = 2; i <= n; i++) {
      if (isPrimeNumber(i))
        //  cout<<i<<" ";
        pr.pb(i);
      }
   }



int main()
{
    ios_base::sync_with_stdio(0);
    cin.tie(0);
 
     int test=1;
     //cin>>test;
     for(int tt=1; tt<=test; tt++){
       ll n;
       cin>>n;
       ll a[n];
       map<ll,ll>mp;
       printPrime(1005);
       ll prs = pr.size();
       ll prc[prs]={0};
       for(ll i=0; i<n; i++){
           cin>>a[i];
           mp[a[i]]++;
       }
       ll gcd = a[0];
       ll ma = a[0];
       for(ll i=1; i<n; i++){
           gcd = __gcd(a[i],gcd);
           ma = max(ma,a[i]);
       }
       if(gcd!=1){
           pp("not coprime");
           return 0;
       }
       ll ans=0;
       for(ll i=0; i<prs; i++){
           for(ll j=0; j<n; j++){
               ll k = a[j],ch=0;
               while(k%pr[i]==0){
                   k/=pr[i];
                   ch=1;
                   if(k==0)break;
               }
               prc[i]+=ch;

           }
       }
        for(ll i=0; i<prs; i++){
            if(prc[i]>1)ans=1;
        }
       if(ans){
           pp("setwise coprime");
       } else {
           pp("pairwise coprime");
       }
       
     //cout<<"Case #"<<tt<<": ";  
     }
 
    return 0;
}