#include <iomanip>
#include <bits/stdc++.h>
using namespace std;
#define ll long long int
#define mod 1000000007
#define vec vector<long long int>
#define fi first
#define se second
#define pb push_back
void sieve(vector<bool> &x, int k)
{

    int i = 2;
    while (i < k)
    {
        if (x[i] == true)
        {

            int j = 2;
            while ((i * j) <= k)
            {
                x[i * j] = false;
                j++;
            }
        }
        i++;
    }
}

int main()
{

    int n;
    cin >> n;
    vector<int> y;
    int m = 0;
    for (int i = 0; i < n; i++)
    {
        int t;
        cin >> t;
        y.pb(t);
        m = max(m, t);
    }
    vector<bool> x(m + 1, true);
    sieve(x, m);
    vector<int> pr;
    int ss = x.size();

    for (int i = 2; i < xx; i++)
    {
        if (x[i] == true)
        {
            pr.pb(i);
            // cout << i << " ";
        }
    }
    int e = pr.size();
    int flag = 0;
    set<int> s;
    map<int, int> w;
    for (int i = 0; i < n; i++)
    {

        int q = y[i];

        int j = 0;
        while (j < e && pr[j] <= q)
        {
            int p = pr[j];
            if (q % p == 0)
            {
                w[p]++;
            }

            j++;
        }
    }
    int count = 0;
    int d = w.size();
    for (auto t : w)
    {
        if (t.second == 1)
        {

            count++;
        }
        else if (t.second >= d)
        {
            flag = 1;
        }
    }

    if (count == d)
    {
        cout << "pairwise coprime" << endl;
    }
    else if (flag == 0)
    {
        cout << "setwise coprime" << endl;
    }
    else
    {
        cout << "not coprime" << endl;
    }
}