#include <bits/stdc++.h>
using namespace std;
#define int long long
#define mod 1000000007
#define all(x) x.begin(), x.end()

int binpow(int a, int b)
{
    int ans = 1;
    if (b == 0)
        return 1;
    while (b)
    {
        if (b & 1)
            ans = ans * a;
        a = a * a;
        b >>= 1;
    }
    return ans;
}

//read question carefully!

int32_t main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    int t = 1;
    // cin >> t;
    while (t--)
    {
        int n;
        cin >> n;
        int a[n];
        for (int i = 0; i < n; ++i)
            cin >> a[i];
        sort(a, a + n);
        int val1 = 0;
        bool f = 0, f1 = 0;
        for (int i = 0; i < n - 1; ++i)
        {
            int val = __gcd(a[i], a[i + 1]);
            // val1 = __gcd(val1, val);
            if (val != 1)
                f = 1;
        }
        val1 = a[n - 1];
        for (int i = 0; i < n - 1; ++i)
        {
            val1 = __gcd(val1, a[i]);
            if (val1 != 1)
            {
                f1 = 1;
            }
        }
        // cout << f << " " << f1 << "\n";
        if (!f)
        {
            cout << "pairwise coprime"
                 << "\n";
        }
        else if (!f1)
        {
            cout << "setwise coprime"
                 << "\n";
        }
        else
        {
            cout << "not coprime"
                 << "\n";
        }
    }
}
