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

using ll = long long;
const ll MOD = 1000000009 + 7;
#define MX 200020
ll a[MX];
set < ll > st;
int main()
{
    ios_base::sync_with_stdio(false); cin.tie(nullptr); cout.tie(nullptr);
    ll n;
    cin >> n;
    for(ll i = 0; i < n; i++)
    {
        cin >> a[i];
    }
    ll gc = a[0];
    for(ll i = 1; i < n; i++)
    {
        gc = __gcd(gc, a[i]);
        st.insert(gc);
    }
    if(gc > 1)
    {
        return cout << "not coprime\n" , 0;
    }
    if(gc == 1)
    {
        if(st.size() == 1)
        {
            return cout << "pairwise coprime\n" , 0;

        }
        else
        {
            return cout << "setwise coprime\n" , 0;

        }

    }
}
