#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define IOS                  \
    ios::sync_with_stdio(0); \
    cin.tie(0);              \
    cout.tie(0)
#define rep(i, a, b) for (int i = a; i < (b); ++i)
#define repd(i, a, b) for (int i = a; i >= (b); --i)
#define all(x) (x).begin(), (x).end()
#define sz(x) (int)(x).size()
typedef long long ll;
const int INF = 0x3f3f3f3f;
const ll LINF = 0x3f3f3f3f3f3f3f3fll;

int main()
{
    IOS;
    int n;
    cin >> n;
    vector<int> a(n);
    vector<bool> checked(1000000, 0);
    rep(i, 0, n) cin >> a[i];
    int count = 0;
    bool pairwise = 1;
    bool not_co = 0;
    for (int i = 2; i <= 1000000; i++)
    {
        if (checked[i])
            continue;
        else
        {
            count = 0;
            rep(i, 0, n)
            {
                if (a[i] % x == 0)
                    count++;
            }
            if (count >= 2)
                pairwise = 0;
            if (count == n)
            {
                not_co = 0;
                break;
            }
            for (int j = 2; i * j <= 1000000; j++)
                checked[i * j] = 1;
        }
    }
    if (pairwise)
        cout << "pairwise coprime" << endl;
    else if (not_co)
        cout << "not coprime" << endl;
    else
        cout << "setwise coprime" << endl;
}
