#include <bits/stdc++.h>
using namespace std;

#define INPUT freopen("input.txt", "r", stdin);

#define ll long long
#define ld long double

#define len(s) s.size()

#define fl(st, en, in) for (int i = st; i < en; i += in)
#define rfl(st, en, de) for (int i = st; i < en; i -= de)
#define ifl(st, en, de) for (int j = st; j < en; j += de)
#define fll fl(0, n, 1)

#define cy cout << "Yes" << endl;
#define cn cout << "No" << endl;
#define ci(s) cin >> s
#define co(s) cout << s << endl
#define nl cout << endl

#define vl vector<ll>
#define pb(x) push_back(x)

#define ms(arr, x) memset(arr, x, sizeof(arr))

#define inf INT_MAX
#define mx (ll)100000009
#define mod 1e9 + 7

//DSU

ll n, m;
ll par[mx];
ll sz[mx];

void make_set(ll v)
{
    par[v] = v;
    sz[v] = 1;
}

ll find_set(ll v)
{
    if (par[v] == v)
        return v;
    return par[v] = find_set(par[v]);
}

void union_set(ll a, ll b)
{
    a = find_set(a);
    b = find_set(b);
    if (a != b)
    {
        if (sz[a] < sz[b])
        {
            swap(a, b);
        }
        par[b] = a;
        sz[a] += sz[b];
    }
}
void solve()
{
    ll n;
    cin >> n;
    ll ar[n];
    map<ll, ll> mp;
    ll g = 0;
    fll
    {
        ci(ar[i]);
        mp[ar[i]]++;
        g = __gcd(g, ar[i]);
    }
    if (g > 1)
    {
        co("not coprime");
        return;
    }
    bool f = true;
    ll val;
    fl(2, 1000000, 1)
    {
        ifl(i, 100000, i)
        {
            val += mp[j];
        }
        if (val > 1)
        {
            f = false;
        }
    }
    if (f)
    {
        co("pairwise coprime");
    }
    else
    {
        co("setwise coprime");
    }
}

int main()
{
    //INPUT;
    // int t;
    // ci(t);
    // while (t--)
    solve();
}