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

typedef long long ll;

ll __lcm(ll a,ll b){
    return (a*b)/__gcd(a,b);
}

int main(){
    
    int n;
    cin>>n;
    ll arr[n];
    
    ll gcd=0,lcm=1;
    ll prod=1;
    for(int i=0;i<n;i++){
        cin>>arr[i];
        gcd = __gcd(gcd,arr[i]);
        lcm = __lcm(lcm,arr[i]);
        prod *= arr[i];
    }
    if(lcm==prod){
        cout<<"pairwise coprime\n";
    }
    else if(gcd==1){
        cout<<"setwise coprime\n";
    }
    else{
        cout<<"not coprime\n";
    }
    return 0;
    
}
