#pragma GCC optimize("Ofast")
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pii = pair<int, int>;
using pll = pair<long long, long long>;
constexpr char ln =  '\n';
constexpr long long MOD = 1000000007LL;
constexpr long long INF = 1001001001LL;
#define all(x) (x).begin(),(x).end()
#define rep(i,n) for(int i=0;i<(n);i++)
#define rept(i, j, n) for(int i=(j); i<(n); i++)
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }



int main(){ 
    int n; cin >> n;
    vector<ll> A(n); rep(i, n) cin >> A[i];

    vector<int> memo(1000100);
    bool is_pc = true;
    rep(i, n){
        if(A[i] > 1 && memo[A[i]])is_pc = false;
        memo[A[i]] = true;
    }
    for(int i=2; i<=1000; i++){
        if(i!=2 && i%2==0)continue;
        int cnt = 0;
        for(int j=i; j<=1000000; j+=i){
           // if(i==2 && j <= 20)cout << "j:" << j << " memo:" << memo[j] << ln;
            if(memo[j])cnt++;
        }
        if(cnt>1)is_pc = false;
    }
    if(is_pc)cout <<  "pairwise coprime" << ln;
    else{
        ll GCD = A[0];
        rept(i, 1, n){
            GCD = __gcd(GCD, A[i]);
        }
        if(GCD==1)cout << "setwise coprime" << ln;
        else cout << "not coprime" << ln;
    }
}

