#include <bits/stdc++.h>
using namespace std;
typedef long long ll;

int main() {
    int n, a[100005];
    ll b, c, d;
    cin >> n;
    for (int i = 0; i < n; i++) {
        cin >> a[i];
    }
    b = a[0];
    c = a[0];
    d = a[0];
    for (int i = 1; i < n; i++) {
        b = gcd(b, a[i]);
        c = lcm(c, a[i]);
        d *= a[i];
    }
    if (c == d) cout << "pairwise coprime" << endl;
    else if (b == 1) cout << "setwise coprime" << endl;
    else cout << "not coprime" << endl;

    return 0;
}