#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using vll = vector<ll>;
using vvll = vector<vll>;
using vvvll = vector<vvll>;
ll gcd(ll n, ll m) {
  while (true) {
    if (n < m) swap(n, m);
    if (!m) break;
    n %= m;
  }
  return n;
}
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  cout << setprecision(20);
  ll N;
  cin >> N;
  vll A(N);
  for (ll i = 0; i < (ll)N; ++i) cin >> A[i];
  vector<bool> prime(1001, true);
  prime[0] = prime[1] = false;
  for (ll i = 0; i < (ll)1001; ++i) {
    if (prime[i]) {
      for (ll j = i + 1; j < (ll)1001; ++j) {
        if (j % i == 0) prime[j] = false;
      }
    }
  }
  bool pc = true;
  for (ll i = 2; i < (ll)1001; ++i) {
    bool flag = false;
    bool valid = true;
    for (ll j = 0; j < (ll)N; ++j) {
      if (A[j] % i == 0) {
        if (flag) {
          valid = false;
          break;
        } else
          flag = true;
      }
    }
    if (!valid) {
      pc = false;
      break;
    }
  }
  if (pc)
    cout << "pairwise coprime" << endl;
  else {
    ll g = A[0];
    for (ll i = 1; i < (ll)N; ++i) g = gcd(g, A[i]);
    if (g == 1)
      cout << "setwise coprime" << endl;
    else
      cout << "not coprime" << endl;
  }
}
