// Hail god Yato
 
#include <bits/stdc++.h> 
using namespace std;
 
#define hs ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
typedef long long ll;
const ll mod = 1000000007;
const ll INF = 1e18;
const ll MAX = 1000001;
//
//
void solve(){
    int n;
    cin>>n;
    vector<int> vec(n);
    int g = 0;
    for(int i = 0; i < n; i++){
        cin>>vec[i];
        g = __gcd(g, vec[i]);
    }
    vector<int> hold(MAX, 0);
    int flag = 1;
    for(int num : vec){
        for(ll i = 2; i*i <= num; i++){
            if(num%i == 0)
                hold[i]++;
            while(num%i == 0)
                num /= i;
            if(hold[i] !=1 ){
                // cout<<i;
                flag = 0;
                break;
            }
        }
        if(num != 1)
            hold[num]++;
        if(num!=1 && hold[num] != 1){
            flag = 0;
            break;
        }
    }
    // for(int i = 1; i < 10; i++)
    //     cout<<hold[i];
    if(flag){
        cout<<"pairwise coprime\n";
    }
    else if(g == 1){
        cout<<"setwise coprime\n";
    }
    else
        cout<<"not coprime\n";
}
int main(){ 
        hs;
        ll t;
        t=1;
        // cin>>t;
        for (int i=1; i<=t; i++){
                //cout<<"Case #"<<i<<": ";
                solve();
         }
        return 0; 
}