#include <bits/stdc++.h>

using namespace std;
#define DBG(x)                         \
    (void)(cout << "L" << __LINE__     \
                << ": " << #x << " = " \
                << (x) << '\n')
#define Lower_bound(v, x) distance(v.begin(), lower_bound(v.begin(), v.end(), x))
#define Upper_bound(v, x) distance(v.begin(), upper_bound(v.begin(), v.end(), x))
typedef long long ll;
using pii = pair<int, int>;
using pli = pair<ll, int>;
using pll = pair<ll, ll>;
const long double PI = (acos(-1));
const long double EPS = 0.0000000001;
const int INF = 0x3f3f3f3f;
const int maxn = 1100000;
int a[maxn];
int cnt[maxn];
void run_case()
{
    int n;
    cin >> n;
    int g = 0;
    for (int i = 1; i <= n; i++)
    {
        int x;
        cin >> x;
        g = __gcd(g, x);
        a[x]++;
    }
    DBG(g);
    bool ok = 1;
    for (int i = 2; i < maxn; i++)
    {
        for (int j = i; j < maxn; j += i)
        {
            cnt[i] += a[j];
        }
        if (cnt[i] > 1)
            ok = 0;
    }
    if (ok)
        cout << "pairwise coprime\n";
    else if (g == 1)
        cout << "setwise coprime\n";
    else
        cout << "not coprime\n";
}
int main()
{
    ios::sync_with_stdio(false);
    cin.tie(0);
    cout << setiosflags(ios::fixed) << setprecision(12);
    run_case();
    cout.flush();
    return 0;
}