#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;
    multiset<int> s;
    bool pairwise = 1;
    int mcount = 0;
    int no1 = 0;
    rep(i, 0, n)
    {
        int t;
        cin >> t;
        if (t == 1)
            no1++;
        s.insert(t);
    }
    vector<bool> checked(1000005, 0);
    int count = 0;
    for (int i = 2; i * i <= 1000000; i++)
    {
        if (checked[i])
            continue;
        if (mcount == n)
            break;
        count = 0;
        for (int j = 1; i * j <= 1000000; j++)
        {
            checked[i * j] = 1;
            count += s.count[i * j];
        }
        if (count >= 2)
            pairwise = 0;
        mcount = max(mcount, count);
    }
    if (pairwise)
        cout << "pairwise coprime" << endl;
    else if (mcount == n)
        cout << "not coprime" << endl;
    else
        cout << "setwise coprime" << endl;
}
