#include<bits/stdc++.h>
using namespace std;

#define NUM 1000001


int prime[NUM];
bool factor[NUM];

void seive(){
    
    for(int i=0;i<NUM;i++){
        prime[i] = -1;
        factor[i] = false;
    }

    
    for(int i=2;i*i<=NUM;i++){
        if(prime[i]==-1){
            for(int j=i*2;j<NUM;j+=i){
                if(prime[j]==-1){
                    prime[j] = i; 
                }
            }
        }
    }
    
}

bool prime_factors(int n){
    while(prime[n]!=-1){

        if(!factor[prime[n]]){
            factor[prime[n]] = true;
        }
        else{
            return false;
        }
        n /= prime[n];
    }

    if(!factor[n]){
        factor[n] = true;
        return true;
    }
    else{
        return false;
    }
}

int main(){
    
    seive();
    
    int n;
    cin>>n;
    
    int temp;
    bool flag = true;
    int gcd = 0;
    for(int i=0;i<n;i++){
        cin>>temp;
        gcd = __gcd(temp,gcd);
        if(flag){
            flag = prime_factors(temp);
        }
    }
    
    if(flag){
        cout<<"pairwise coprime\n";
    }
    else if(gcd==1){
        cout<<"setwise coprime\n";
    }
    else{
        cout<<"not coprime\n";
    }
    
    
    return 0;
}
