#pragma GCC target ("avx2")
#pragma GCC optimization ("O3")
#pragma GCC optimization ("unroll-loops")

#include <bits/stdc++.h>
#define ll long long
#define pb push_back
#define pii pair<int, int>
#define pll pair<ll, ll>
#define st first
#define sc second
#define arr array
#define yes cout << "Yes" <<"\n"
#define no cout << "No" <<"\n"
#define lb lower_bound
#define ub upper_bound
#define fast ios_base::sync_with_stdio(false)
#define out cin.tie(nullptr)
#define task "A"
#define open(task)  if(fopen(task".inp", "r")){freopen(task".inp", "r", stdin); freopen(task".out", "w", stdout);}
#define open_to_check(task)  if(fopen(task".inp", "r")){freopen(task".inp", "r", stdin);}
#define int64 long long

const int maxn = 1e6 + 40;
const int maxN = 1e5 + 5;
const ll mod = 1e9 + 7;

using namespace std;

/// Count : 1

ll a[maxn + 60];
ll can[maxn + 60];
vector<int>adj[maxn];

int main()
{
    //if(fopen(task".inp", "r")){
        //freopen(task".inp", "r", stdin);
        //freopen(task".out", "w", stdout);
    //}
    fast;
    out;
    int n;
    cin >> n;
    for(int i=1; i<=n; i++){
        cin >> a[i];
    }

    for(int i=2; i*i<=maxn - 40; i++){
        if(adj[i].size() == 0){
            adj[i].pb(i);
            for(int j=i*i; j<=maxn - 40; j+=i){
                if(i != 1) adj[j].pb(i);
            }
        }
    }

    ll g = 0;
    bool chk = true;
    for(int i=1; i<=n; i++){
        g = __gcd(g, a[i]);
        if(can[a[i]] == 1 || a[i] == 1){
            chk = false;
        }
        if(chk == true){
        for(auto j : adj[a[i]]){
            can[j] = 1;
           for(int j1=j; j1<=maxn; j1 += j){
               can[j1] = 1;
           }
        }
        }
    }
    if(chk == true){
        cout << "pairwise coprime";
        return 0;
    }
    if(g == 1){
        cout << "setwise coprime";
        return 0;
    }
    cout << "not coprime";
}
