#include <bits/stdc++.h>
using namespace std;
int main () {
    int n;
    cin >> n;
    int a[n];
    for(int i=0;i<n;i++) cin >> a[i];
    int algcd = a[0];
    for(int i=0;i<n;i++) algcd = gcd(algcd,a[i]);
    reverse(a,a+n);
    int b[n],curgcd = a[0];
    for(int i=0;i<n;i++){
        curgcd =  gcd(curgcd,a[0]);
        b[i] = curgcd;
    }
    reverse(b,b+n);
    int flag = 1;
    for(int i=0;i<n;i++){
        if(b[i]!=1) flag = 0;
    }
    if(flag) cout << "pairwise coprime" << endl;
    else{
        if(algcd==1) cout << "setwise coprime"<< endl; 
        else cout << "not coprime" << endl;
}
}