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

int main()
{
    int n;
    cin >> n;

    vector<int> a(n);
    rep(i, n) cin >> a[i];

    vector<int> b(n);
    int t = 1;
    for (int i = n - 2; i >= 0; --i)
    {
        t *= a[i + 1];
        t %= a[i];
        b[i] = t;
    }

    int flg = 0;
    for (int i = 0; i < n - 1; i++)
    {
        if (__gcd(a[i], b[i]) != 1)
            flg = 1;
    }

    t = __gcd(a[0], a[1]);
    for (int i = 2; i < n; i++)
    {
        t = __gcd(t, b[i]);
    }

    if (t != 1)
        flg = 2;

    if (flg == 2)
    {
        cout << "not coprime" << endl;
    }
    else if (flg == 1)
    {
        cout << "setwise coprime" << endl;
    }
    else
    {
        cout << "pairwise coprime" << endl;
    }

    return 0;
}
