#include<bits/stdc++.h>
/* #define int long long */
/* #define double long double */
#define rep(i, n) for(int i = 0; i < (int)n; i++)
#define repa(i, s, n) for(int i = s; i < (int)n; i++)
#define MOD 1000000007
using namespace std;
using ll = long long;
typedef vector<int> vi;
typedef pair<int, int> P;
#define rrep(i,a,b) for(int i=a;i>=b;i--)
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return true; } return false; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return true; } return false; }
 
signed main(){
    int n;
    cin >> n;
    vi a(n);
    rep(i, n) cin >> a[i];

    bool pc = true, sc = false;
    int tmp = a[0];
    for(int i = 0; i < n; i++){
        tmp = __gcd(tmp, a[i]);
        if(tmp == 1){
            sc = true;
        }
        for(int j = i+1; j < n; j++){
            if(__gcd(a[i], a[j]) != 1){
                pc = false;
                break;
            }
        }
    }

    if(pc){
        cout << "pairwise coprime" << endl;
    }else if(sc){
        cout << "setwise coprime" << endl;
    }else{
        cout << "not coprime" << endl;
    }


}