#include <iostream>
#include <iomanip>
#include <vector>
#include <algorithm>
#include <numeric>
#include <functional>
#include <cmath>
#include <queue>
#include <stack>
#include <string>
#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;

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(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;
        }
    }
}