#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef unsigned long long int ull;
#define IO ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0)
const int MOD = 1e9+7;
int main() {
    IO;
    int n ;
    cin>>n ;
    vector<int>primes (1e6+2 , -1 );
    for(ll i = 2 ; i<1e6 ; i++){
        if(primes[i]==-1){
            for(ll j = i*i ; j <1e6+2 ; j+=i){
                primes[j]=i;
            }
        }
    }

    vector<int>vec(n);
    unordered_set<int>sing ;
    bool found =false;
    for(int  i = 0 ;i <n ; i++ ){
        cin>>vec[i];

        int num = vec[i];
        unordered_set<int>last;
        while (!found&&primes[num]!=-1){
            if(last.count(primes[num])){
                num/=primes[num];
                continue;
            }
            if(sing.count(primes[num])){
                found=true;
                break;
            }
            sing.insert(primes[num]);
            last.insert(primes[num]);
            num/=primes[num];
        }
        if(num!=1){
            if(sing.count(num)){
                found=true;
            }
            sing.insert(num);
        }

    }
    if(!found){
        cout<<"pairwise coprime" <<endl;
        return 0;
    }
    int num = vec[0];
    for(int i = 1 ; i<n ; i++){
        num = __gcd(num , vec[i]);
    }
    if(num==1){
        cout<<"setwise coprime"<<endl;
        return 0;
    }
    cout<<"not coprime" <<endl;
    return 0;
}