#include <bits/stdc++.h>
#define fast ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define int long long
#define endl "\n"
using namespace std;

const int N = 1e6 + 5;
int arr[N], fq[N], mul[N];

int NC3(int num) {
    if (num < 3) return 0;

    int ans = (num * (num - 1) * (num - 2)) / 6;

    return ans;
}
int32_t main() {

    fast
    int n;
    cin >> n;
    cin >> arr[0];
    int gcd = arr[0];
    fq[arr[0]]++;
    for(int i = 1; i < n; i++) {
        cin >> arr[i];
        fq[arr[i]]++;
        gcd = __gcd(arr[i], gcd);
    }
    for (int i = 1; i <= 1000000; i++) {
        for (int j = i; j <= 1000000; j += i) {
            mul[i] += fq[j];
        }
        mul[i] = NC3(mul[i]);
    }

    for(int i = 1000000; i >= 1; i--) {
        for(int j = 2 * i; j <= 1000000; j += i)
            mul[i] -= mul[j];
    }
    int pairs = mul[1];
    bool flag = true;
    // cout<<pairs<<" ****"<<endl;
    if(pairs != 1)flag = false;
    if(gcd == 1 && flag) {
        cout << "pairwise coprime";
    } else if(gcd == 1 && !flag) {
        cout << "setwise coprime";
    } else {
        cout << "not coprime";
    }







    return 0;
}

