#include <iostream>
#include <algorithm>
#include <cmath>
#include <vector>
#include <string>
#include <map>
#include <cstdio>
#include <numeric>
#include <functional>

using namespace std;
typedef long long ll;

ll N;
vector<ll> A;
vector<ll> P;

ll used[1000001];

vector<ll> Eratosthenes(const ll N)
{
    vector<bool> is_prime(N + 1);
    for (ll i = 0; i <= N; i++)
    {
        is_prime[i] = true;
    }
    std::vector<ll> P;
    for (ll i = 2; i <= N; i++)
    {
        if (is_prime[i])
        {
            for (ll j = 2 * i; j <= N; j += i)
            {
                is_prime[j] = false;
            }
            P.emplace_back(i);
        }
    }
    return P;
}

ll gcd(ll a, ll b)
{
    ll c;
    if(b > a)
        swap(a, b);
    while (b != 0)
    {
        c = a % b;
        a = b;
        b = c;
    }
    return a;
}

int main()
{
    bool f1 = true;
    bool f2 = false;
    cin >> N;
    A.resize(N);
    P = Eratosthenes(1000000);
    for (int i = 0; i < N; i++)
    {
        cin >> A[i];
        if(A[i] < 2)
        {
            continue;
            f2 = true;
        }
        ll ra = sqrt(A[i]) + 1;
        for (int j = 0; P[j] <= ra; j++)
        {
            if(A[i] % P[j] == 0)
            {
                if (used[P[j]] == 1)
                {
                    f1 = false;
                    break;
                }
                else
                    used[P[j]] = 1;
            }
        }
    }

    ll pgcd = A[0];
    for (int i = 1; i < N; i++)
    {
        pgcd = __gcd(pgcd, A[i]);
    }
    if(f1)
    {
        cout << "pairwise coprime" << endl;
    }
    else if(pgcd == 1 || f2)
    {
        cout << "setwise coprime" << endl;
    }
    else
    {
        cout << "not coprime" << endl;
    }
    return 0;
}