#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
using vl = vector<ll>;
using vvl = vector<vl>;
using vs = vector<string>;
using vb = vector<bool>;
using pll = pair<ll, ll>;
using vpll = vector<pll>;
const ll oo = 0x3f3f3f3f3f3f3f3fLL;
const double eps = 1e-9;
ll gcd(ll a, ll b) { return (b == 0) ? a : gcd(b, a % b); }
ll lcm(ll a, ll b) { return a / gcd(a, b) * b; }
int main() {
  cin.sync_with_stdio(0);
  ll N;
  cin >> N;
  vl a(N);
  for (ll &l : a) cin >> l;
  bool pairwise = true;
  ll product = a[0];
  for (ll i = (1); i < (N); i++) {
    ll new_product = product * a[i];
    if (lcm(product, a[i]) != new_product) {
      pairwise = false;
      break;
    }
  }
  if (pairwise) {
    cout << "pairwise coprime" << endl;
    return 0;
  }
  ll g = gcd(a[0], a[1]);
  for (ll i = (2); i < (N); i++) {
    g = gcd(g, a[i]);
  }
  if (g == 1) {
    cout << "setwise coprime" << endl;
  } else {
    cout << "not coprime" << endl;
  }
}
