#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define rep(i, n) for (int i = 0; i < int(n); ++i)

bool prime(int x)
{
    for (int i = 2; i * i <= x; ++i)
    {
        if (x % i == 0)
            return false;
    }
    return true;
}
vector<pair<int, int>> prime_factory(int x)
{
    vector<pair<int, int>> res;
    if (prime(x))
    {
        res.push_back({x, 1});
        return res;
    }
    for (int i = 2; i <= x; ++i)
    {
        int j = x / i;
        if (x % i == 0 && prime(i))
        {
            pair<int, int> p = {i, 0};
            while (x % i == 0)
                p.second++, x /= i;
            res.push_back(p);
        }
    }
    return res;
}
void solve(void)
{
    int n;
    cin >> n;
    vector<int> a(n);
    rep(i, n) cin >> a[i];
    map<int, int> mp;
    rep(i, n)
    {
        for (auto i : prime_factory(a[i]))
            mp[i.first] += 1;
    }

    //判定
    bool f = true;
    for (auto i : mp)
    {
        if (i.second > 1)
            f = false;
    }
    if (f)
        cout << "pairwise coprime" << endl;
    else
    {
        int x = a[0];
        rep(i, n - 1) x = __gcd(x, a[i + 1]);
        if (x == 1)
            cout << "setwise coprime" << endl;
        else
            cout << "not coprime" << endl;
    }
}
int main(void)
{
    solve();
}