#include <bits/stdc++.h>
using namespace std;
#define pb push_back
#define F first
#define S second
#define ALL(a) (a).begin(),(a).end()
#define MAX 200005
#define int long long int
int dsu[MAX];
int ranks[MAX];
void create(int n)
{
    for(int i = 0 ;i  <= n ; i++)
    {
        dsu[i] = i;
        ranks[i] = 0;
    }
}
int find_set(int v)
{
    if(v == dsu[v])
        return v;
    return dsu[v] = find_set(dsu[v]);
}
void merge(int a, int b)
{
    a = find_set(a);
    b = find_set(b);
    if(a == b)
        return;
    if (ranks[a] < ranks[b])
        swap(a, b);
    dsu[b] = a;
    if (ranks[a] == ranks[b])
        ranks[a]++;
}
void solve()
{
    int n;
    cin >> n;
    int a[n];
    for(int i = 0 ; i < n ; i++)
        cin >> a[i];
    int nonprimes = 0;
    for(int i = 0 ; i < n ; i++)
    {
        int ele = a[i];
        int count = 0;
        for(int j = 2 ; j*j <= ele ; j++)
        {
            if(ele%j == 0)
            {
                count++;
                break;
            }
        }
        if(count != 0)
            nonprimes++;
    }
    if(nonprimes <= 1){
        cout << "pairwise coprime";
        return;
    }
    int GCD = a[0];
    for(int i = 1 ; i < n ; i++)
        GCD = __gcd(GCD,a[i]);
    if(GCD == 1)
        cout << "setwise coprime";
    else cout << "not coprime";
    
    
    
    return;
}

int32_t main()
{
    int T = 1;
    //cin >> T;
    for(int i = 1 ; i <= T ; i++)
        solve();
    
    return 0;
}
/*
 AtCoder after Google Online Challenge Fail:(
 */
