#include <iostream>
#include <vector>
#include <map>
#include <algorithm>
using namespace std;

vector<long long> pnumbers;

void setpnumber(){
    pnumbers.push_back(2);
    for(long long i = 3; i <= 1000; i++){
        bool isPrime = true;
        for(auto p:pnumbers){
            if(i%p == 0) isPrime = false;
        }
        if(isPrime) pnumbers.push_back(i);
    }
}

int main(){
    setpnumber();
    int N;
    cin >> N;
    long long A[N];
    for(int i = 0; i < N; i++){
        cin >> A[i];
    }
    map<int ,int> primeUsed;

    bool isSetwiseCoprime = true;
    bool isPairwiseCoprime = true;
    // cout << pnumbers[0] << endl;
    for(int i = 0; i < N; i++){
        long long a = A[i];
        for(auto p:pnumbers){
            if(a%p == 0){
                // cout << p << endl;
                // cout << primeUsed[2] << endl;
                if(primeUsed[p]){
                    isPairwiseCoprime = false;
                    break;
                }
                primeUsed[p] = 1;
            }
        }
        if(!isPairwiseCoprime)break;
    }
    if(isPairwiseCoprime){
        cout << "pairwise coprime" << endl;
        return 0;
    }
    long long g = __gcd(A[0],A[1]);
    for(int i = 2; i < N; i++){
        g = __gcd(g, A[i]);
    }
    if(g == 1) cout << "setwise coprime" << endl;
    else cout << "not coprime" << endl;
}