#include<bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i=0; i < n; i++)
#define repd(i, n) for (int i = n-1; i > -1; i--)
#define repran(i, a,b) for (int i = a; i<b;i++)
#define all(x) (x).begin(), (x).end()
typedef long long ll;
typedef pair<int, int> P;
int main()
{
    int n;
    cin >> n;
    vector<int> a(n); // setだとgcdを正しく評価できていない。
    int gcd = 0;
    int m = 0;
    rep(i, n){
        cin >> a[i];
        gcd = __gcd(gcd, a[i]);
        m = max(m, a[i]);
    }
    if (gcd > 1) {
        cout << "not coprime" << endl;
        return 0;
    }
    int mcnt = 0;
    vector<bool> is_prime(m+1, true);
    is_prime[0]= 0;
    is_prime[1]= 0;
    for (int i =2; i*i <= m; i++){
        if (is_prime[i]){
            for (int j = 2; i*j <= m; j++){
                is_prime[i*j] = 0;

            }
        }
    }
    vector<int> cnt(m+1);
    for (int x: a){
        for (int i = 2; i*i <= x; i++){
            if (is_prime[i] and x%i == 0){
                cnt[i]++;
                while (x%i == 0) x/= i;
            }
            if (cnt[i] > 1){
                cout << "setwise coprime" << endl;
                return 0;
            }
        }
    }
    cout << "pairwise coprime" << endl;
    return 0;
}
