#include <bits/stdc++.h>
#define pb push_back
#define vii vector<int>
#define task "ABC"
#define pll pair<ll, ll>
#define pii pair< ll, pair< ll, ll > >
#define fi first
#define se second

using ll = long long;
using ld = long double;
using ull = unsigned long long;
const ll mod = 1e9 + 7;
using namespace std;
const int N = 1e6+5;
ll tong, m, n, k, t, T, ntest, ans, u, v, b[N], lab[N];
string s;
ll a[N], d[N];
vector<pii> kq;
vector<pll> adj[N], adt[N];
bool check;
ll findp(ll u)
{
    return lab[u] < 0 ? u : lab[u] = findp(lab[u]);
}
void hop(ll u, ll v)
{
    if(lab[u] > lab[v])swap(u, v);
    lab[u] += lab[v];
    lab[v] = u;
    ans = max(ans, -lab[u]);
}
inline void sol()
{
    cin >> n;
    m = N;
    for(int i = 1; i <= n; i ++)
    {
        cin >> b[i];
    }
    for(int i = 2; i < m; i ++)
    {
        if(d[i] == 0)
        {
            for(int j = i; j < m; j += i)
            {
                d[j] = 1;
                a[j] = (a[j] | (1 << k));
            }
            ++k;
        }
    }
    check = true;
    for(int i = 1; i <= n; i ++)
    {
        if((ans & a[b[i]]) != 0)
        {
            check = false;
            break;
        }
        else ans = (ans | a[b[i]]);
    }
    if(check)
       {
           cout << "pairwise coprime" ;
           return;
       }
    ans = b[1];
    for(int i = 2; i <= n; i ++)
    {
        ans = __gcd(ans, b[i]);
        if(ans == 1)
        {
            cout << "setwise coprime";
            return;
        }
    }
    cout << "not coprime";
}
int main()
{
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
    sol();

}



