#include <bits/stdc++.h>
#define _GLIBCXX_DEBUG
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
using namespace std;

vector<int> Eratosthenes(const int N)
{
    std::vector<bool> is_prime(N + 1);
    for (int i = 0; i <= N; i++)
    {
        is_prime[i] = true;
    }
    std::vector<int> P;
    for (int i = 2; i <= N; i++)
    {
        if (is_prime[i])
        {
            for (int j = 2 * i; j <= N; j += i)
            {
                is_prime[j] = false;
            }
            P.emplace_back(i);
        }
    }
    return P;
}

int main(){
    int N;
    cin >> N;
    vector<int> A(N);
    for(auto &x: A){
        cin >> x;
    }
    
    int v;
    v = A[0];
    for (auto x:A) {
        v = gcd(v, x);
    }
    if (v != 1) {
        cout << "not coprime" << endl;
    }
    else {
        int cnt = 0;
        for (auto &x:Eratosthenes(1000)) {
            cnt = 0;
            for (auto &y: A) {
                if (y%x == 0) cnt += 1;
            }
            if (cnt >= 2) {
                cout << "setwise coprime" << endl;
                exit(0);
            }
        }
        cout << "pairwise coprime" << endl;
    }
    return 0;
}
