#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using vl = vector<ll>;
using vvl = vector<vl>;
using vb = vector<bool>;
using vs = vector<string>;
using pll = pair<ll, ll>;
const ll oo = 0x3f3f3f3f3f3f3f3fLL;
const double eps = 1e-9;
vb visited;
vvl adj;
ll gcd(ll a, ll b) { return (b == 0) ? a : gcd(b, a % b); }
int main() {
  cin.sync_with_stdio(0);
  ll n;
  cin >> n;
  vl a(n);
  for (ll i = (0); i < (n); i++) {
    cin >> a[i];
  }
  ll x = a[0];
  bool pairwise = true;
  for (ll i = (1); i < (n); i++) {
    x = gcd(x, a[i]);
    pairwise &= x == 1;
  }
  if (pairwise) {
    cout << "pairwise coprime" << endl;
  } else if (x == 1) {
    cout << "setwise coprime" << endl;
  } else {
    cout << "not coprime" << endl;
  }
}
