#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ii = pair<int, int>;
using iii = pair<ii, int>;
#define vt vector
#define pq priority_queue
#define pb push_back
#define pf push_front
#define mp make_pair
#define fi first
#define se second
#define __lcm(a, b) a * b / __gcd(a, b)
const int MOD = 1e9 + 7;
const int INF = 2e9;
const int N = 1e6 + 5;

int n, gcd, cnt;
int a[N], freq[N];
bool valid;

void sieve() {
    valid = true;
    for(int i = 2; i <= N - 5; i++) {
        cnt = 0;
        for(int j = i; j <= N - 5; j += i) {
            cnt += freq[j];
        }
        if(cnt > 1) valid = false;
    }
}

void solve() {
    cin >> n;
    for(int i = 1; i <= n; i++) {
        cin >> a[i];
        freq[a[i]]++;
    }
    gcd = a[1];
    for(int i = 2; i <= n; i++) {
        gcd = __gcd(gcd, a[i]);
    }
    if(gcd > 1) {
        cout << "not coprime\n";
        return;
    }
    sieve();
    cout << (!valid ? "setwise coprime\n" : "pairwise coprime\n");
}

int main() {
 
    ios_base::sync_with_stdio(0);
    cin.tie(0); cout.tie(0);
    
    solve();
    
}