#include <iostream>
#include <iomanip>
#include <vector>
#include <algorithm>
#include <numeric>
#include <functional>
#include <cmath>
#include <queue>
#include <stack>
#include <string>
#include <cmath>
#include <limits>
#include <math.h>
#include <cassert>
#define REP(i, n) for (int i = 0; i < n; i++)
#define REPR(i, n) for (int i = n; i >= 0; i--)
#define FOR(i, m, n) for (int i = m; i < n; i++)
#define INF 1e9 + 7
#define ALL(v) v.begin(), v.end()
using namespace std;
typedef long long ll;

bool IsPrime(int num)
{
    if (num < 2)
        return false;
    else if (num == 2)
        return true;
    else if (num % 2 == 0)
        return false; // 偶数はあらかじめ除く

    double sqrtNum = sqrt(num);
    for (int i = 3; i <= sqrtNum; i += 2)
    {
        if (num % i == 0)
        {
            // 素数ではない
            return false;
        }
    }

    // 素数である
    return true;
}

int main()
{
    int n;
    vector<int> a;
    int t;
    int flag = 0;
    cin >> n;
    for (int i = 0; i < n; i++)
    {
        if (scanf("%d", &t) == 1)
            ;
        a.push_back(t);
    }
    REP(i, n - 1)
    {
        FOR(j, i + 1, n)
        {
            if (IsPrime(a[i]) || IsPrime(a[j]))
            {
                ;
            }
            else if (gcd(a[i], a[j]) != 1)
            {
                flag = 1;
                break;
            }
        }
        if (flag == 1)
        {
            break;
        }
    }
    if (flag == 0)
    {
        cout << "pairwise coprime" << endl;
    }
    else
    {
        int r = accumulate(a.begin(), a.end(), 0, [](int m, int n) {
            return gcd(m, n);
        });
        if (r == 1)
        {
            cout << "setwise coprime" << endl;
        }
        else
        {
            cout << "not coprime" << endl;
        }
    }
}