#include<bits/stdc++.h>

#define si(a) scanf("%d",&a)
#define sl(a) scanf("%lld",&a)
#define sd(a) scanf("%lf",&a)
#define sc(a) scanf("%c",&a)
#define ss(a) scanf("%s",a)
#define pi(a) printf("%d\n",a)
#define pl(a) printf("%lld\n",a)
#define pc(a) putchar(a)
#define ms(a) memset(a,0,sizeof(a))
#define repi(i, a, b) for(register int i=a;i<=b;++i)
#define repd(i, a, b) for(register int i=a;i>=b;--i)
#define reps(s) for(register int i=head[s];i;i=Next[i])
#define ll long long
#define ull unsigned long long
#define vi vector<int>
#define pii pair<int,int>
#define mii unordered_map<int,int>
#define msi unordered_map<string,int>
#define lowbit(x) ((x)&(-(x)))
#define ce(i, r) i==r?'\n':' '
#define pb push_back
#define fi first
#define se second
#define all(x) x.begin(),x.end()
#define INF 0x3f3f3f3f
#define pr(x) cout<<#x<<": "<<x<<endl
using namespace std;

inline int qr() {
    int f = 0, fu = 1;
    char c = getchar();
    while (c < '0' || c > '9') {
        if (c == '-')fu = -1;
        c = getchar();
    }
    while (c >= '0' && c <= '9') {
        f = (f << 3) + (f << 1) + c - 48;
        c = getchar();
    }
    return f * fu;
}

const int N = 1e6 + 10;

typedef pair<ll, int> P;
vector<ll> tmp;

ll mul(ll a, ll b, ll mod) {
    ll res = 0;
    a %= mod, b %= mod;
    while (b) {
        if (b & 1) {
            res += a;
            if (res >= mod) res -= mod;
        }
        b >>= 1, a <<= 1;
        if (a >= mod) a -= mod;
    }
    return res;
}

ll qpow(ll x, ll n, ll mod) {
    ll res = 1;
    while (n) {
        if (n & 1) res = mul(res, x, mod);
        x = mul(x, x, mod), n >>= 1;
    }
    return res;
}

bool check(ll a, ll n) {
    ll x = n - 1, y;
    int t = 0;
    while ((x & 1) == 0) x >>= 1, t++;
    x = qpow(a, x, n);
    repi(i, 1, t) {
        y = mul(x, x, n);
        if (y == 1 && x != 1 && x != n - 1) return true;
        x = y;
    }
    return y != 1 ? true : false;
}

bool Miller_Robin(ll n)//复杂度klog(n) k为判定次数，此处为12
{
    if (n == 2) return true;
    if (n == 1 || !(n & 1)) return false;
    const int arr[12] = {2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37};
    repi(i, 0, 2) {
        if (arr[i] >= n) break;
        if (check(arr[i], n)) return false;
    }
    return true;
}

void Pollard_Rho(ll n) {
    if (Miller_Robin(n)) {
        tmp.pb(n);
        return;
    }
    ll x, y, z, c, d;
    int i, j;
    while (true) {
        x = rand() * rand() % (n - 1) + 1, c = rand() * rand() % (n - 1) + 1;
        for (y = x, i = j = 2;; i++) {
            x = (mul(x, x, n) + c) % n, z = x - y;
            if (z < 0) z = -z;
            d = __gcd(z, n);
            if (d > 1 && d < n) {
                Pollard_Rho(d), Pollard_Rho(n / d);
                return;
            }
            if (x == y) break;
            if (i == j) y = x, j <<= 1;
        }
    }
}

vector<P> divi;
map<ll, int> mp;

void Prime_Factorization(ll n) {
    tmp.clear(), divi.clear(), mp.clear();
    if (n == 1) {
        return;
    }
    Pollard_Rho(n);
    for (auto x:tmp) mp[x]++;
    for (auto x:mp) divi.pb(P(x.fi, x.se));
}

int n, cnt[N];

int main() {
    n = qr();
    bool flag1 = true, flag2 = true;
    repi(i, 1, n) {
        int x = qr();
        Prime_Factorization(x);
        for (auto it:divi) {
            if (it.fi == 1)continue;
            if (cnt[it.fi]) {
                flag1 = false;
                break;
            }
            cnt[it.fi]++;
        }
    }
    if (flag1)puts("pairwise coprime");
    else {
        repi(i, 2, 1000000)
            if (cnt[i] == n) {
                flag2 = false;
                break;
            }
        puts(flag2 ? "setwise coprime" : "not coprime");
    }
    return 0;
}