#include <bits/stdc++.h>
using namespace std;
int main()
{
    long int i = 0, j, N, p;
    cin >> N;
    long int A[N];
    p = 1;
    cin >> A[i];
    p = A[i];
    for (i = 1; i < N; i++)
    {
        cin >> A[i];
        p = __gcd(p, A[i]);
    }
    if (p != 1)
    {
        cout << "not coprime" << endl;
        return 0;
    }
    vector<bool> SOSU(1000100, true);
    vector<int> P;
    for (i = 2; i < (SOSU.size()) - 50; i++)
    {
        if (SOSU[i])
        {
            P.push_back(i);
            for (j = 2 * i; j < (SOSU.size()) - 50; j += i)
            {
                SOSU[j] = false;
            }
        }
    }
    vector<bool> SOINSU((P.size()), false);
    bool B;
    for(i = 0;i < N;i++){
        for(p = 0;p < (P.size());p++){
            if(A[i] < P[p]){
                break;
            }
            B = false;
            while(A[i] % P[p] == 0){
                A[i] /= P[p];
                if(SOINSU[p]){
                    cout << "setwise coprime" << endl;
                    return 0;
                }
                B = true;
            }
            if(B){
                SOINSU[p] = true;
            }
        }
    }
    cout << "pairwise coprime" << endl;
}