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

void prime_factorization(int n, map<int, int> &p)
{
    int buf = n;
    if(buf % 2 == 0)
    {
        p[2]++;
        buf /= 2;
    }
    while (buf % 2 == 0)
    {
        buf /= 2;
    }
    for (int i = 3; i * i <= n; i += 2)
    {
        if(buf % i == 0)
        {
            p[i]++;
            buf /= i;
        }
        while (buf % i == 0)
        {
            buf /= i;
        }
    }
    if(buf != 1)
    {
        p[buf]++;
    }
    return;
}

int main()
{
	int n;
    cin >> n;
    vector<int> a(n);

    map<int, int> prime;
    for (int i = 0; i < 100000; i++)
    {
        prime[i] = 0;
    }

    for (int i = 0; i < n; i++)
    {
        cin >> a[i];
        prime_factorization(a[i], prime);
    }

    bool pc = true;
    for (int i = 0; i < 100000; i++)
    {
        if(prime[i] >= 2)pc = false;
    }
    

    int allgcd = a[0];
    for (int i = 0; i < n; i++)
    {
        allgcd = gcd(a[i], allgcd);
    }

    if(pc)
    {
        cout << "pairwise coprime" << endl;
    }
    else if(allgcd == 1)
    {
        cout << "setwise coprime" << endl;
    }
    else
    {
        cout << "not coprime" << endl;
    }
}