#include <bits/stdc++.h>
#define FIN         ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0)
#define ii          pair<int,int>
#define F           first
#define S           second
#define pb          push_back
#define all(x)      (x).begin(),(x).end()
#define rall(x)     (x).rbegin(),(x).rend()
#define fore(i,a,b) for(int i = a;i < b; i+= 1)
#define forr(i,a)   for(int i = a; i >= 0; i--)
#define fori(i,m)   for(auto i = m.begin(); i != m.end(); i++) 
#define w(t)        while(t--)
#define sz(s)       int(s.size())
#define cls(a,car)  memset(a,car,sizeof (a))
#define db(x)       cerr << #x << " is " << x << '\n'
#define FI          freopen("input.txt", "r", stdin)
#define FO          freopen("output.txt", "w", stdout)
#define EjecuteTime cerr << "Time elapsed: " << 1.0 * clock() / CLOCKS_PER_SEC << " s.\n"
#define angle(x)    double(x * acos(-1) / 180.0)
using namespace std;
typedef unsigned long long   ll;
typedef vector<int> vi;
typedef vector<ii>  vii;
const int N = 1e6 + 5;
const ll mod = 1e9 + 7;
const double E = 1e-9;
//int dx[] = {0, -1}, dy[] = {-1, 0};
//int dx[] = {1, 0, -1, 0}, dy[] = {0, 1, 0, -1};
//int dx[] = {1, 1, 0, -1, -1, -1, 0, 1}, dy[] = {0, 1, 1, 1, 0, -1, -1, -1};
//int dx[] = {2, 1, -1, -2, -2, -1, 1, 2}, dy[] = {1, 2, 2, 1, -1, -2, -2, -1};
// fflush(stdout)
// cout << flush
// a + b = a ^ b + 2 * (a & b)
int v[N];
int pr[N];
void sieve(){
    for(int i = 1; i < N; i++)
        pr[i] = i;
    for(int i = 2; i * i < N; i++)
        if(pr[i] == i)
            for(int j = i * i; j < N; j += i)
                pr[j] = i;
}
void solve(){
    int n;
    cin >> n;
    int gcd = 0;
    unordered_map<int, int> m;
    for(int i = 0; i < n; i++){
        cin >> v[i];
        gcd = __gcd(gcd, v[i]);
    }
    
    for(int i = 0; i < n; i++){
        unordered_set<int> s;
        int a = v[i];

        while(a != 1){
            s.insert(pr[a]);
            a /= pr[a];
        }
        for(auto i : s){
            m[i]++;
        }
    }
    bool flag = 0;
    int cnt = 0;
    auto it = m.begin();
    int last = it->S;
    for(auto j : m){
        if(last == j.S)
            cnt++;
    }
    if(gcd == 1 && cnt == sz(m) && last > 1)
        cout << "setwise coprime\n";
    else if(cnt == sz(m) && last == 1)
        cout << "pairwise coprime\n";
    else
        cout << "not coprime\n";
    
}
int main(){
    FIN;
    int t = 1;
    sieve();
    for(int i = 1; i <= t; i++){
        solve();
    }
    //EjecuteTime;
    return 0;
}       