#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 = 200010;
const int MOD = 1e9+7;
const int INF = 1e9;
const ll LINF = 1e18;
int n, m, a[maxn];
string s, ss;

vector<int> generate_prime(int a)
{
    map<int, int> M;
    int i=2;
    while(a%=i)
    {
        a/=i, i++;
        M[i]=1;
    }
    vector<int> v;
    for(auto u : M) v.push_back(u.first);
    return v;
}

int main()
{
    ios_base::sync_with_stdio(0); cin.tie(0);
    cin >> n;
    for(int i = 0; i < n; i++) cin >> a[i];
    int gcd = a[0];
    for(int i = 1; i < n; i++) gcd = __gcd(gcd, a[i]);
    bool ok=true;
    map<int, int> M;
    for(int i = 0; i < n; i++)
    {
        vector<int> v;
        v = generate_prime(a[i]);
        for(auto u : v)M[u]++;

    }
    for(auto u : M) if(u.second>1) ok=false;
    if(!ok) cout << "pairwise coprime\n";
    else if(gcd==1) cout << "setwise coprime\n";
    else cout << "not coprime\n";
}