#include <bits/stdc++.h>
#include <cmath>
using namespace std;
#define int long long int
#define pb push_back
#define ub upper_bound
#define lb lower_bound
#define mp make_pair
#define F first
#define S second
#define all(a) a.begin(), a.end()
#define endl '\n'
#define boost                    \
    ios::sync_with_stdio(false); \
    cin.tie(0);                  \
    cout.tie(0);
#define mod 1000000007
#define inf 1e18
#define pf push_front
#define pob pop_back
#define pof pop_front
#define deb(x) cout << #x << " " << x << endl;
#define deb2(x, y) cout << #x << " " << x << " " << #y << " " << y << endl;
#define deb3(x, y, z) cout << #x << " " << x << " " << #y << " " << y << " " << #z << " " << z << endl;
#define file                          \
    freopen("input.txt", "r", stdin); \
    freopen("output.txt", "w", stdout);

typedef pair<int, int> pi;
typedef pair<int, pair<int, int>> piii;
typedef vector<int> vi;
typedef vector<pi> vpi;
typedef vector<vi> vvi;

int32_t main()
{
    // boost
    int t = 1;
    //cin>>t;
    while (t--)
    {
        int n;
        cin >> n;
        int a[n];
        for (int i = 0; i < n; i++)
        {
            cin >> a[i];
        }
        unordered_map<int, int> mp;
        int res = 0;
        for (int i = 0; i < n; i++)
        {
            mp[a[i]]++;
            res = __gcd(res, a[i]);
        }
        assert(res!=0);
        if (res > 1)
        {
            cout << "not coprime" << endl;
            continue;
        }
        int mx = *max_element(a, a + n);
        int flag = 0;
        for (int i = 2; i <=mx; i++)
        {
            int tot = 0;
            for (int j = 2; j <=mx; j+=i)
            {
                tot += mp[j];
            }
            if (tot > 1)
            {
                cout << "setwise coprime" << endl;
                flag = 1;
                break;
            }
        }
        if (!flag)
        {
            cout << "pairwise coprime" << endl;
        }
    }
}