#include<bits/stdc++.h>
//#pragma GCC optimize ("-O3")

using namespace std;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
//const long double PI = 3.14159265358979323846;

int main()
{
    ios_base::sync_with_stdio(false); cin.tie(nullptr); cout.tie(nullptr);
    int n;
    cin >> n;
    vector<long long > ar(n);
    long long pro = 1;
    for (int i = 0; i < n; i++)
    {
        cin >> ar[i];
        pro *= ar[i];
    }
    bool pw = true;
    bool sc = true;
    long long gc = ar[0];
    for (int i = 0; i < n; i++)
    {
        gc = __gcd(gc, ar[i]);
    }
    if (gc != 1)
        sc = false;
    for (int i = 0; i < n; i++)
    {
        if (__gcd(pro/ar[i], ar[i]) != 1)
            pw = false;
    }
    if (pw)
        cout << "pairwise coprime";
    else if (sc)
        cout << "setwise coprime";
    else
        cout << "not coprime";
    return 0;
}
