#include <bits/stdc++.h>
using namespace std;
#define ll long long int
#define fast ios_base::sync_with_stdio(false);  cin.tie(NULL); cout.tie(NULL);
#define scan(a,n) for(long int index=0;index<n;index++) cin>>a[index];
#define print(a,n) for(long int index=0;index<n;index++) cout<<a[index]<<" ";cout<<endl;
#define mod 1000000007
#define pb push_back
#define mp make_pair
#define ss second
#define ff first
#define vli vector<long long int>
#define vlli vector<pair<long long int,long long int>>
#define vsi vector<string>
#define vci vector<char>
#define all(n) (n.begin(),n.end())


 
int main() {
   #ifndef ONLINE_JUDGE
    freopen("input.txt","r",stdin);
    freopen("output.txt","w",stdout);
    #endif
    fast;
    ll n;
    cin>>n;
    ll a[n],i;
    scan(a,n);
    map<ll,int> m;
    ll mu=1,lc=1,gc=__gcd(a[0],a[1]),f=0,x,j;
    for(i=0;i<n;i++){
        if(i>1)
             gc=__gcd(a[i],gc);

            if(f==0){
                if(m[2]==1 && a[i]%2==0){
                        f=1;
                        break;
                    }
                 while(a[i]%2==0){
                   
                    a[i]/=2;
                    
                     m[2]++;
                 }
                 x=a[i];
                 for(j=3;j<=sqrt(x);j+=2){
                    if(m[j]==1 && a[i]%j==0){
                        f=1;
                        break;
                    }
                      while(a[i]%j==0){
                        
                        m[j]++;

                    a[i]/=j;
                      }
                 }
                 m[a[i]]++;

               
            }
            // cout<<f<<endl;
        

    }
    for(i=0;i<n;i++){
        if(i>1)
             gc=__gcd(a[i],gc);
     }
    if(f==0){
        cout<<"pairwise coprime";
        return 0;
    }
    // cout<<gc<<endl; 
    if(gc==1) cout<<"setwise coprime";
    else cout<<"not coprime";


return 0;    
 }  