#include <bits/stdc++.h>
using namespace std;
#define int long long
vector<int> sieve(int max) {
    vector<bool>prime(max + 1, true);
    vector<int>A;
    for (int i = 2; i<= max; ++i)
        if (prime[i]) {
            A.push_back(i);
            for (int j = 2; i * j <= max; ++j)
                prime[i * j] = false;
        }
    return A;
}
map<int, int>B;
bool END = false;
signed main() {
    vector<int>prime = sieve(1000000);
    int N; 
    cin >> N;
    vector<int>A(N);
    int count = 0;
    for (int i = 0; i < N; i++) {
        cin >> A[i];
        if (i == 0)count = A[i];
        count = gcd(count, A[i]);
    }
    if (count != 1) {
        puts("not coprime");
        return 0;
    }
    for(int i=0;i<N;i++){
        int X = A[i];
        for (int a : prime) {
            if(a > A[i]*A[i]) {
                break;
            }
        }
        if (X % a != 0) continue;
        while (X % a == 0)X /= a;
        if(B[a]>0){
          puts("setwise coprime");
                  return 0
        }
        B[a]++;          
    }
    puts("pairwise coprime");
}
