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

typedef long long ll;
typedef unsigned long long ull;
typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<ll> vll;

template <typename T>
inline void read(T &x)
{
    T data = 0, f = 1;
    char ch = getchar();
    while (!isdigit(ch))
    {
        if (ch == '-')
            f = -1;
        ch = getchar();
    }
    while (isdigit(ch))
    {
        data = (data << 3) + (data << 1) + ch - '0';
        ch = getchar();
    }
    x = f * data;
}

const int inf = 0x3f3f3f3f;
const double eps = 1e-8;
const int maxn = 5009;
bitset<maxn> num;
vector<int> prime;
inline void init(int n)
{
    for (int i = 2; i <= n; ++i)
    {
        if (!num[i])
        {
            prime.push_back(i);
        }
        for (int j = 0; j < prime.size(); ++j)
        {
            if (i * prime[j] >= n)
                break;
            num[i * prime[j]] = 1;
            if (i % prime[j] == 0)
                break;
        }
    }
}
vi v;
int bb[200];
int main()
{
    init(1000000);
    int sz = prime.size();
    //cout << sz << endl;
    int n;
    read(n);
    bool flag = true;
    for (int i = 1; i <= n; ++i)
    {
        int x;
        read(x);
        v.emplace_back(x);
        if (x > 1 && flag)
        {
            for (int j = 0; j < sz; ++j)
            {
                if (x % prime[j] == 0)
                {
                    if (bb[j] == 0)
                        bb[j] = i;
                    else
                    {
                        flag = false;
                        break;
                    }
                }
            }
        }
    }
    if (flag)
    {
        cout << "pairwise coprime" << endl;
        return 0;
    }
    int g = v[0];
    for (int i = 1; i < n; ++i)
    {
        g = __gcd(g, v[i]);
        if (g == 1)
            break;
    }
    if (g == 1)
        cout << "setwise coprime" << endl;
    else
        cout << "not coprime" << endl;
    return 0;
}