#include <bits/stdc++.h>
#define ll long long
#define rep(i, a, b) for (ll i = a; i < b; i++)
#define per(i, a, b) for (ll i = a; i > b; i--)
#define vi vector<int>
#define vii vector<vi>
#define vl vector<ll>
#define vll vector<vl>
#define pb push_back
#define pii pair<int, int>
#define pll pair<ll, ll>
#define ff first
#define ss second
#define a(v) (v.begin(), v.end())
#define intlimit 2e9 + 69
#define longlimit 8e18 + 69
#define MOD 1000000007
#define gcd(a, b) __gcd(a, b)
#define lcm(a, b) ((a) * (b) / gcd(a, b))
using namespace std;
int main()
{
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
    int n;
    cin >> n;
    vi v(n);
    rep(i, 0, n)
    {
        cin >> v[i];
    }
    vi klo;
    rep(i, 2, 1000)
    {
        int b = 0;
        for (int j = 2; j * j <= i; j++)
        {
            if (i % j == 0)
            {
                b = 1;
                break;
            }
        }
        if (!b)
        {
            klo.pb(i);
        }
    }
    int b = 0;
    rep(j, 0, klo.size())
    {
        int coco = 0;
        rep(i, 0, n)
        {
            if (v[i] % klo[j] == 0){
                coco++;
                while(v[i]%klo[j]==0){
                    v[i]/=klo[j];
                }
            }
        }
        if (coco > 1)
        {
            b = 1;
            break;
        }
    }
    vi tk(1000001, 0);
    rep(i, 0, n)
    {
        tk[v[i]]++;
        if (tk[v[i]] > 1)
        {
            b = 1;
            break;
        }
    }
    if (!b)
    {
        cout << "pairwise coprime";
        return 0;
    }
    int g = v[0];
    rep(i,1,n){
        g = gcd(g,v[i]);
    }
    if(g==1){
        cout << "setwise coprime";
    }else{
        cout << "not coprime";
    }
}
