#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();
    //    pp(prs);
       ll prc[prs]={0};
       map<ll,ll> mpp;
       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 j=0; j<n; j++){
               ll k = a[j],ch=0;
               while (k % 2 == 0)  
                {  
                    // cout << 2 << " ";  
                    ch = 1;
                    k = k/2;  
                }  
                if(ch)mpp[2]++;
            
                // k must be odd at this point. So we can skip  
                // one element (Note i = i +2)  
                for (int i = 3; i <= sqrt(k); i = i + 2)  
                {  
                    // While i divides k, print i and divide k  
                    ch = 0;
                    while (k % i == 0)  
                    {  
                        // cout << i << " ";  
                       ch = 1;
                        k = k/i;  
                    }  
                    if(ch)mpp[i]++;
                }  
            
                // This condition is to handle the case when k  
                // is a prime number greater than 2  
                if (k > 2)mpp[k]++;
                    // cout << n << " "; 

           }
       
        for(auto k : mpp){
            if(k.se>1){
                ans++;
                // pp(k.se);
            }
        }
       if(ans>0){
        //    pp(ans);
           pp("setwise coprime");
       } else {
           pp("pairwise coprime");
       }
       
     //cout<<"Case #"<<tt<<": ";  
     }
 
    return 0;
}