#include<bits/stdc++.h>
/* #define int long long */
/* #define double long double */
#define rep(i, n) for(int i = 0; i < (int)n; i++)
#define repa(i, s, n) for(int i = s; i < (int)n; i++)
#define MOD 1000000007
using namespace std;
using ll = long long;
typedef vector<int> vi;
typedef pair<int, int> P;
#define rrep(i,a,b) for(int i=a;i>=b;i--)
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return true; } return false; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return true; } return false; }

const int A = 100005;
signed main(){
    int n;
    cin >> n;
    vi a(n), c(A);
    rep(i, n){
        cin >> a[i];
        c[a[i]]++;
    }

    bool pc = true;
    for(int i = 2; i < A; i++){
        int cnt = 0;
        for(int j = i; j < A; j += i){
            cnt += c[j];
        }
        if(cnt > 1){
            pc = false;
        }
    }

    if(pc){
        cout << "pairwise coprime" << endl;
        return 0;
    }

    int g = 0;
    rep(i, n) g = __gcd(g, a[i]);
    if(g == 1){
        cout << "setwise coprime" << endl;
        return 0;
    }

    cout << "not coprime" << endl;




}