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

bool sosu[1000005];

int main() {
    int N; cin >> N;
    vector<int> A(N);
    rep(i, N){
        cin >> A[i];
    }

    for (int i = 2; i < 1000001; i++){
        if(sosu[i])continue;
        for (int j = i+i; j < 1000001; j+=j){
            sosu[j] = true;
        }
    }

    bool check = true;
    for (int i = 2; i < 1000001; i++){
        if(!sosu[i]){
            int cnt = 0;
            for (int j = 0; j < N; j++){
                if(A[j] % i == 0)cnt++;
            }
            if(cnt > 1){
                check = false;
            }
        }
    }

    if(check){
        cout << "pairwise coprime" << endl;
        return 0;
    }

    int now = A[0];
    for (int i = 1; i < N; i++){
        now = __gcd(now, A[i]);
    }
    if(now == 1){
        cout << "setwise coprime" << endl;
    } else {
        cout << "not coprime" << endl;
    }


    return 0;
}