#include<iostream>
#include<vector>
#include<algorithm>
#include<math.h>
#include<queue>
#include<map>
#include<string>
#include<cassert>
#include<numeric>
#define all(x) (x).begin(),(x).end()
#define print(x) cout << (x) << endl
typedef long long ll;
typedef long double ld;
const ll MOD = 1000000007;
const ll MOD2 = 998244353;
 
using namespace std;

int NMAX = 1000001;
vector<int> prime(NMAX,0);

void pre(){
    vector<int> t(NMAX,0);
    for(int i=2; i<NMAX; i++){
        if(t[i] == 0)   prime[i] = 1;
        for(int j=i; j<NMAX; j+=i)  t[i] = 1;
    }
}

int main(){
    pre();
    int N, g;  cin >> N;
    int NMAX = 1000001;
    vector<int> a(N), c(NMAX,0), p(NMAX,0);
    for(int i=0; i<N; i++){
        cin >> a[i];
        if(i == 0)  g = a[i];
        else    g = gcd(g,a[i]);
        if(p[a[i]] == 1){
            for(int j=i+1; j<N; j++){
                cin >> a[j];
                g = gcd(g,a[j]);
            }
            break;
        }else{
            if(prime[a[i]] == 0){
                for(int j=a[i]; j<NMAX; j+=a[i])    p[j] = 1;
            }else{
                for(int j=2; j<1001; j++){
                    if(a[i]%j == 0){
                        for(int k=j; k<NMAX; k+=j)  p[k] = 1;
                    }
                }
            }
            if(i == N-1){print("pairwise coprime"); return 0;}
        }
    }
    if(g == 1)  print("setwise coprime");
    else    print("not coprime");
}