#include<bits/stdc++.h>
using namespace std;
#define int long long
#define mod 1000000007

int findMaxGCD(vector <int>& arr, int n) 
{ 
    // Computing highest element 
    int high = 0; 
    for (int i = 0; i < n; i++) 
        high = max(high, arr[i]); 
  
    // Array to store the count of divisors 
    // i.e. Potential GCDs 
    vector <int> divisors(high + 1);
  
    // Iterating over every element 
    for (int i = 0; i < n; i++) 
    { 
        // Calculating all the divisors 
        for (int j = 1; j <= sqrt(arr[i]); j++) 
        { 
            // Divisor found 
            if (arr[i] % j == 0) 
            { 
                // Incrementing count for divisor 
                divisors[j]++; 
  
                // Element/divisor is also a divisor 
                // Checking if both divisors are 
                // not same 
                if (j != arr[i] / j) 
                    divisors[arr[i] / j]++; 
            } 
        } 
    }
    for (int i = high; i >= 1; i--) 
      
        // If this divisor can divide at least 2 
        // numbers, it is a GCD of at least 1 pair 
        if (divisors[i] > 1) 
            return i;     
}
  
int32_t main(){
     int n; cin>>n;
     set <int> s;
     vector <int> a(n);
      int flag1=0, GCD=1;
     
      for(int i=0 ; i<n ; i++)
            cin>>a[i];
            
      sort(a.begin(),a.end());

      for(int i=0 ; i<n ; i++){
        int j=2;
        for(j=2 ; j*j<=a[i] ; j++){
                if(a[i]%j==0){
                   if(s.find(j)!=s.end()) {flag1=1; break;}
                   else{
                      s.insert(j);  s.insert(a[i]/j);
                   }
                }
            }
            if(j*j>a[i]){
               s.insert(a[i]);
            }
              if(flag1==1) break;
      }
      
        for(int i=0 ; i<n ; i++){
               if(i==0) GCD=a[0];
               else GCD = __gcd(GCD,a[i]);
        }
       if(findMaxGCD(a,n)) cout<<"pairwise coprime";
       else if(GCD==1) cout<<"setwise coprime";
       else cout<<"not coprime";
}