#include <bits/stdc++.h>
using namespace std;

typedef long long ll;

#define pb push_back
#define mp make_pair
#define f first
#define s second
#define all(a) a.begin(), a.end()

const int maxn = 1000001;
const int MOD = 1e9+7;
const int INF = 1e9;
const ll LINF = 1e18;
int n, m, a[maxn];
string s, ss;

void solve()
{
    cin >> n;
    for(int i = 0; i < n; i++) cin >> a[i];
    ll gcd=a[0];
    ll lcm=1;
    for(int i = 0; i < n; i++) lcm*=(ll)a[i];
    for(int i = 1; i < n; i++)
        gcd = __gcd(gcd, (ll)a[i]);
    ll LCM=a[0];
    for(int i = 1; i < n; i++)
        LCM = (LCM*(ll)a[i])/__gcd(LCM, (ll)a[i]);
    if(lcm==LCM) cout << "pairwise coprime\n";
    else if(gcd==1) cout << "setwise coprime\n";
    else cout << "not coprime\n";
}

int main()
{
    ios_base::sync_with_stdio(0); cin.tie(0);
    int t=1;
    //cin >> t;
    while(t--) solve();
}
