#include <bits/stdc++.h>

#define int long long

#define F first
#define S second
#define all(x) (x).begin(), (x).end()

using namespace std;

int32_t main() {
    ios::sync_with_stdio(false);
    cin.tie(0); cout.tie(0);

//  freopen("input.txt", "r", stdin);
//  freopen("output.txt", "w", stdout);

    int n, g = -1;
    cin >> n;
    map<int, int> mp;
    int a[n];
    for(int i = 0; i < n; i++) {
        cin >> a[i];
        if(i) {
            if(g == -1)
                g = __gcd(a[i], a[i-1]);
            else
                g = __gcd(g, a[i]);
        }
    }

    if(g > 1) {
        cout << "not coprime";
        return 0;
    }

    if(n > 100000) {
        cout << "setwise coprime";
        return 0;
    }

    for(int i = 0; i < n; i++) {
        int t = a[i];
        for(int j = 2; j*j <= a[i]; j++) {
            if(t%j == 0)
                mp[j]++;
            if(mp[j] > 1) {
                cout << "setwise coprime";
                return 0;
            }
            while(t%j == 0)
                t /= j;
        }
        if(t > 1) {
            mp[t]++;
            if(mp[t] > 1) {
                cout << "setwise coprime";
                return 0;
            }
        }
    }

    cout << "pairwise coprime";

    return 0;
}
