#include <bits/stdc++.h>
#include <unordered_set>
using namespace std;
#define printclock cerr << "Time : " << 1000 * (ld)clock() / (ld)CLOCKS_PER_SEC << "ms\n";
#define deb2(x, y) cout << #x << ": " << x << " | " << #y << ": " << y << endl
#define deb1(x) cout << #x << ": " << x << endl
#define rep(i, a, n) for (int i = (a); i < (n); ++i)
#define prec(n) fixed << setprecision(n)
#define all(a) a.begin(), a.end()
#define fast                      \
    ios_base::sync_with_stdio(0); \
    cin.tie(0);                   \
    cout.tie(0);
#define pii pair<int, int>
#define vii vector<int>
#define ld long double
#define int long long
#define MOD LLONG_MAX
#define mp make_pair
#define pb push_back
#define endl "\n";
#define MAXN 1000001
inline void get(vector<int> &arr, int n)
{
    int a;
    for (int i = 0; i < n; i++)
    {
        cin >> a;
        arr.push_back(a);
    }
}
inline void print(vector<int> &arr, int n)
{
    for (int i = 0; i < n; i++)
        cout << arr[i] << " ";
    cout << endl;
}
/*----------------------------------TEMPLATE------------------------------------*/
int spf[MAXN];

// Hash to store prime factors count
int hash1[MAXN] = {0};

// Function to calculate SPF (Smallest Prime Factor)
// for every number till MAXN
void sieve()
{
    spf[1] = 1;
    for (int i = 2; i < MAXN; i++)

        // Marking smallest prime factor for every
        // number to be itself
        spf[i] = i;

    // Separately marking spf for every even
    // number as 2
    for (int i = 4; i < MAXN; i += 2)
        spf[i] = 2;

    // Checking if i is prime
    for (int i = 3; i * i < MAXN; i++)
    {

        // Marking SPF for all numbers divisible by i
        if (spf[i] == i)
        {
            for (int j = i * i; j < MAXN; j += i)

                // Marking spf[j] if it is not
                // previously marked
                if (spf[j] == j)
                    spf[j] = i;
        }
    }
}

// Function to store the prime factors after dividing
// by the smallest prime factor at every step
void getFactorization(int x)
{
    int temp;
    while (x != 1)
    {
        temp = spf[x];
        if (x % temp == 0)
        {

            // Storing the count of
            // prime factors in hash
            hash1[spf[x]]++;
            x = x / spf[x];
        }
        while (x % temp == 0)
            x = x / temp;
    }
}

// Function that returns true if there are
// no common prime factors between x
// and other numbers of the array
bool check(int x)
{
    int temp;
    while (x != 1)
    {
        temp = spf[x];

        // Checking whether it common
        // prime factor with other numbers
        if (x % temp == 0 && hash1[temp] > 1)
            return false;
        while (x % temp == 0)
            x = x / temp;
    }
    return true;
}

// Function that returns true if there is
// an element in the array which is coprime
// with all the other elements of the array
bool hasValidNum(int arr[], int n)
{

    // Using sieve for generating prime factors
    sieve();

    for (int i = 0; i < n; i++)
        getFactorization(arr[i]);

    // Checking the common prime factors
    // with other numbers
    for (int i = 0; i < n; i++)
        if (check(arr[i]))
            return true;

    return false;
}
int32_t main()
{
#ifndef ONLINE_JUDGE
    freopen("input.txt", "r", stdin);
    //freopen("output.txt", "w", stdout);
#endif
    fast;
    /*----------------------------PEEPEEPOOPOO-------------------------------------*/
    int n;
    cin >> n;
    int v[n];
    rep(i,0,n) cin >> v[i];
    if(hasValidNum(v,n))
    {
        cout << "pairwise coprime" << endl;
    }
    else
    {
        int gcd = v[0];
        rep(i,1,n)
        {
            gcd = __gcd(gcd,v[i]);
        }
        if(gcd==1)
        {
            cout << "setwise coprime" << endl;
        }
        else
        {
            cout << "not coprime" << endl;
        }
    }
    return(0);
}
/*--------------------------------PEEPEEPOOPOO-------------------------------------*/