#include <iostream>
#include <vector>
#include <algorithm>
#include <cmath>
#include <queue>
#include <map>

using namespace std;
typedef long long ll;

long long GCD(long long x, long long y)
{
    if (y == 0)
        return x;
    else
        return GCD(y, x % y);
}

int main()
{
    ll n;
    cin >> n;
    vector<ll> a(n);
    for (ll i = 0; i < n; i++)
    {
        cin >> a[i];
    }
    string anstext1 = "pairwise coprime";
    string anstext2 = "setwise coprime";
    string anstext3 = "not coprime";
    vector<ll> gcc_acc(n + 1);
    bool flagA = true;
    for (ll i = 0; i < n; i++)
    {
        gcc_acc[i + 1] = gcd(a[i], gcc_acc[i]);
        if (i == 0)
            continue;
        if (1LL != gcc_acc[i + 1])
        {
            flagA = false;
        }
    }
    string anstext;
    if (flagA)
    {
        anstext = anstext1;
    }
    else
    {
        if (gcc_acc[n] == 1LL)
        {
            anstext = anstext2;
        }
        else
        {
            anstext = anstext3;
        }
    }
    cout << anstext << endl;
    return 0;
}