#include "bits/stdc++.h"
#include "ext/pb_ds/assoc_container.hpp"
#include "ext/pb_ds/tree_policy.hpp"
#define ordered_set tree<pair<int, int>, null_type, less<pair<int, int>>, rb_tree_tag, tree_order_statistics_node_update>
using namespace std;
using namespace __gnu_pbds;
#define int long long int
#define pb push_back
#define vec vector<int>
#define fo(i, n) for (int i = 0; i < n; i++)
#define foo(i, a, b) for (int i = a; i < b; i++)
#define mp make_pair
#define deb(x) cout << #x << " --> " << x << endl;
#define deb1a(v)                  \
    cout << #v << "--->" << endl; \
    for (auto it : v)             \
        cout << it << " ";        \
    cout << endl;
#define deb2a(v)                  \
    cout << #v << "--->" << endl; \
    for (auto it : v)             \
    {                             \
        for (auto it1 : it)       \
        {                         \
            cout << it1 << " ";   \
        }                         \
        cout << endl;             \
    }
#define deb3a(v)                               \
    cout << #v << "-->" << endl;               \
    for (auto it : v)                          \
    {                                          \
        cout << it.fi << " " << it.se << endl; \
    }
#define mod 1000000007
#define so(v) sort(v.begin(), v.end())
#define fi first
#define se second
#define db1(x) cout << #x << "=" << x << endl
#define db2(x, y) cout << #x << "=" << x << "," << #y << "=" << y << endl
#define db3(x, y, z) cout << #x << "=" << x << "," << #y << "=" << y << "," << #z << "=" << z << endl
int power(int x, unsigned int y, int p)
{
    int res = 1;
    x = x % p;
    while (y > 0)
    {
        if (y & 1)
            res = (res * x) % p;
        y = y >> 1;
        x = (x * x) % p;
    }
    return res;
}
int mI(int a, int m)
{
    return power(a, m - 2, m);
}
vector<vector<int>> dir = {{0, 1}, {0, -1}, {1, 0}, {-1, 0}, {1, 1}, {1, -1}, {-1, 1}, {-1, -1}};

int gcd(int a, int b)
{
    if (b == 0)
        return a;
    return gcd(b, a % b);
}
int getLCM(int a, int b)
{
    int m;
    m = (a > b) ? a : b;
    while (true)
    {
        if (m % a == 0 && m % b == 0)
            return m;
        m++;
    }
}

#define MAXN 1000001

// stores smallest prime factor for every number
int spf[MAXN];

// Calculating SPF (Smallest Prime Factor) for every
// number till MAXN.
// Time Complexity : O(nloglogn)
void sieve()
{
    spf[1] = 1;
    for (int i = 2; i < MAXN; i++)

        // marking smallest prime factor for every
        // number to be itself.
        spf[i] = i;

    // separately marking spf for every even
    // number as 2
    for (int i = 4; i < MAXN; i += 2)
        spf[i] = 2;

    for (int i = 3; i * i < MAXN; i++)
    {
        // checking if i is prime
        if (spf[i] == i)
        {
            // marking SPF for all numbers divisible by i
            for (int j = i * i; j < MAXN; j += i)

                // marking spf[j] if it is not
                // previously marked
                if (spf[j] == j)
                    spf[j] = i;
        }
    }
}

// A O(log n) function returning primefactorization
// by dividing by smallest prime factor at every step
map<int, int> m,mm;
vector<int> getF(int x)
{
    vector<int> ret;
    while (x != 1)
    {
        ret.push_back(spf[x]);
        int c = 0;
        m[spf[x]]++;
        x = x / spf[x];
    }
    return ret;
}
vector<int> getf(int x)
{
    vector<int> ret;
    while (x != 1)
    {
        ret.push_back(spf[x]);
        int c = 0;
        mm[spf[x]]++;
        x = x / spf[x];
    }
    return ret;
}
void solve()
{
    int n;
    cin >> n;
    vec v(n);
    // vec v(n + 2, 1), gl(n + 2, 1), gr(n + 2, 1);
    // int s = 1;
    // foo(i, 1, n + 1)
    // {
    //     cin >> v[i];
    //     gl[i] = (gl[i - 1] * v[i]) / (gcd(gl[i - 1], v[i]));
    // }

    // for (int i = n; i >= 0; i--)
    // {
    //     gr[i] = (gr[i + 1] * v[i]) / (gcd(gr[i + 1], v[i]));
    // }

    // int g = 1;
    // int val = v[1];
    // foo(i, 2, n + 1)
    // {
    //     val = gcd(val, v[i]);
    // }
    fo(i,n){
        cin >> v[i];
        getF(v[i]);
    }
    int g = 1;
    int val = v[0];
    foo(i,1,n){
        val = gcd(val, v[i]);
    }
    foo(i, 0, n )
    {
        // //int lcmr = (gl[i - 1] * (long double)1.0) / gcd(gl[i - 1], gr[i + 1]) * gr[i + 1];
        // int lcmr = getLCM(gl[i - 1], gr[i + 1]);
        // if (gcd(v[i], lcmr) != 1)
        // {
        //     g = 0;
        // }
        mm.clear();
        getf(v[i]);
        for(auto it:mm){
            if(it.se<m[it.fi]){
                g = 0;
            }
        }
    }
    if (g == 1)
    {
        cout << "pairwise coprime";
    }
    else if (val == 1)
    {
        cout << "setwise coprime";
    }
    else
    {
        cout << "not coprime";
    }
}
int32_t main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    srand(time(0));

    // FILE *fin = freopen("ip.txt","r",stdin);
    // FILE *fout = freopen("op.txt","w",stdout);
    int t = 1, nn = 1;
    //cin >> t;
    while (t--)
    {
        // cout << "Case #" << nn << ":"
        //      << " ";
        // nn++;
        sieve();
        //deb1a(getF(4));
        solve();
    }
}


Measured memory_bytes: 23596