#include<bits/stdc++.h>
using namespace std;
#define ll    long long
#define pb          push_back
#define F first
#define S second
#define    endl        '\n'
#define all(v) (v).begin(), (v).end()
template<typename T> ostream &operator<<(ostream &os, const vector<T> &v)
{
    os << '{';
    string sep;
    for (const auto &x : v) os << sep << x, sep = ", ";
    return os << '}';
}
template<typename T, size_t size> ostream &operator<<(ostream &os, const array<T, size> &arr)
{
    os << '{';
    string sep;
    for (const auto &x : arr) os << sep << x, sep = ", ";
    return os << '}';
}
template<typename A, typename B> ostream &operator<<(ostream &os, const pair<A, B> &p)
{
    return os   << '(' << p.first << ", " << p.second << ')';
}
void dbg_out()
{
    cerr << endl;
}
template<typename Head, typename... Tail> void dbg_out(Head H, Tail... T)
{
    cerr << ' ' << H;
    dbg_out(T...);
}

#ifdef LOCAL
#define dbg(...) cerr << "(" << #__VA_ARGS__ << "):", dbg_out(__VA_ARGS__)
#else
#define dbg(...)
#endif
const int N = 3e6 + 5;
std::vector<ll> p(N, 0);

void solve()
{
    ll n, g = 0;
    cin >> n;
    std::vector<ll> v(n);
    for(ll &i : v) cin >> i, g = __gcd(i, g);
    if(g > 1)
    {
        cout << "not coprime";
    }
    else
    {
         cout<<"sa";
        bool pos = 1;
        for(ll i = 2; i < N; i++)
        {
            if(p[i]) continue;
            for(ll j = i; j < N; j += i)
                p[j] = i;
        }
        set<ll> cur;
        for(ll i : v)
        {
            if(!pos) break;
            ll x = i;

            while(x != 1 and pos)
            {
                ll y = p[x];
                while(x % y == 0)
                {
                    x /= y;
                }
                if(cur.count(y))
                    pos = 0;
                cur.insert(y);
            }
        }

        cout << (pos ? "pairwise coprime" : "setwise coprime");
    }

}
int main()
{

#ifdef LOCAL
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
#endif
    ios_base::sync_with_stdio(false);
    cin.tie(0);


    ll TESTS = 1;
    // cin >> TESTS;
    for(int t = 1; t <= TESTS; t++)
    {
        solve();
    }
    return 0;
}
