#include<bits/stdc++.h>
#define ll long long int
using namespace std;
const ll maxS = 1e6 + 5;

int main(){
    ll prime[maxS];
    memset(prime , -1 , sizeof(prime));
    for(ll i = 2; i*i <= maxS; i++){
        if(prime[i] == -1){
            for(ll j = 2*i; j <= maxS; j += i){
                prime[j] = i;
            }
        }
    }
    // cout<<prime[200000]<<endl;
    // for(int i = 1; i < 22; i++){
    //     cout<<prime[i]<<" ";
    // }
    // cout<<endl;
    ll n;
    cin>>n;
    ll a[n];
    map<ll , ll>m;
    ll allGcd , flag = 0;
    for(int i = 0; i < n; i++){
        cin>>a[i];
        if(flag == 1){
            continue;
        }
        ll temp = a[i];
        while(temp != -1){
            ll no;
            if(prime[temp] == -1){
                no = temp;
                temp = -1;
            }
            else{
                no = prime[temp];
                temp = temp / prime[temp];
            }
            if(m.find(no) != m.end()){
                flag = 1;
                break;
            }
            // cout<<temp<<" "<<no<<" ";
            m[no]++;
            if(temp == -1){
                // cout<<endl;
                break;
            }
            while(temp % no == 0){
                temp /= no;
            }
            // cout<<temp<<" "<<no<<endl;
            
        }
    }
    allGcd = a[0];
    for(int i = 0; i< n; i++){
        allGcd = __gcd(allGcd ,  a[i]);
    }
    if(flag){
        if(allGcd == 1){
            cout<<"setwise coprime\n";
        }
        else{
            cout<<"not coprime\n";
        }
    }
    else{
        cout<<"pairwise coprime\n";
    }
}