#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define rep(i,a,b) for(ll i=(a);i<=(b);++i)
#define req(i,a,b) for(ll i=(a);i>=(b);--i)
#define name "a"
#define pb push_back
#define sz size()
#define ff first
#define ss second
#define xd '\n'
#define dc " "
#define Truong_Thanh_Minh ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);
typedef pair < ll , ll > ii;
const ll maxn = 1e6+7, oo = 1e18, base = 311, mod = 1e9+7;
const double PI = 3.141592654;
ll t, n, a[maxn], gcd, cnt[maxn];
int main()
{
    Truong_Thanh_Minh
    //freopen(name".inp","r",stdin);
    //freopen(name".out","w",stdout);
    cin >> n;
    rep (i, 1, n)
    {
        cin >> a[i];
        gcd = __gcd(gcd, a[i]);
    }
    if (gcd >= 2)
    {
        cout << "not coprime";
        return 0;
    }
    rep (i, 1, n)
    {
        ++ cnt[a[i]];
        for (int j = 2; j*j <= a[i]; ++j)
        {
            if (a[i]%j != 0)
                continue;
            ++cnt[j];
            if (cnt[j] >= 2)
            {
                cout << "setwise coprime";
                return 0;
            }
            if (j*j != a[i])
            {
                ++cnt[a[i]/j];
                if (cnt[a[i]/j] >= 2)
                {
                    cout << "setwise coprime";
                    return 0;
                }
            }
        }
    }
    cout << "pairwise coprime";
}
