#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<int, int>;
const int INF = 1001001001;
const ll LINF = 1LL << 60;
const int MOD = 1'000'000'007;

template <typename T>
void print(const T &v)
{
    for (int i = 0; i < v.size(); i++)
    {
        if (i)
            cout << ' ';
        cout << v[i];
    }
    cout << endl;
}

template <class T>
inline bool chmin(T &a, T b)
{
    if (a > b)
    {
        a = b;
        return true;
    }
    return false;
}

template <class T>
inline bool chmax(T &a, T b)
{
    if (a < b)
    {
        a = b;
        return true;
    }
    return false;
}

vector<pair<int, int>> factorization(int num)
{
    map<int, int> mp;

    int tmp = num;
    for (int i = 2; i * i <= num; i++)
    {
        while (tmp % i == 0)
        {
            mp[i]++;
            tmp /= i;
        }
    }
    if (tmp != 1)
    {
        mp[tmp]++;
    }
    vector<pair<int, int>> ret;
    for (auto m : mp)
    {
        ret.push_back(make_pair(m.first, m.second));
    }
    return ret;
}

int main()
{
    int n;
    cin >> n;
    map<int, int> mp;
    vector<int> a(n);
    for (int i = 0; i < n; i++)
    {
        int a;
        cin >> a;
        auto fac = factorization(a);
        for (auto f : fac)
        {
            ++mp[f.first];
        }
    }
    bool pw_flag = true;
    for (auto m : mp)
    {
        if (m.second == n)
        {
            cout << "not coprime" << endl;
            return 0;
        }
        if (m.second > 1)
        {
            pw_flag = false;
        }
    }
    if (pw_flag)
    {
        cout << "pairwise coprime" << endl;
    }
    else
    {
        cout << "setwise coprime" << endl;
    }
    return 0;
}
