#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
#define overload4(_1, _2, _3, _4, name, ...) name
#define overload3(_1, _2, _3, name, ...) name
#define rep1(n) for (ll i = 0; i < n; ++i)
#define rep2(i, n) for (ll i = 0; i < n; ++i)
#define rep3(i, a, b) for (ll i = a; i < b; ++i)
#define rep4(i, a, b, c) for (ll i = a; i < b; i += c)
#define rep(...) overload4(__VA_ARGS__, rep4, rep3, rep2, rep1)(__VA_ARGS__)
template <class T>
bool chmin(T& a, const T& b) {
  if (a > b) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T>
bool chmax(T& a, const T& b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
typedef pair<int, int> P;

const long double EPS = 1e-10;
const long long INF = 1e18;
const int MOD = (int)1e9 + 7;
const long double PI = acos(-1.0L);
vector<ll> prime;
vector<ll> eratosthenes(long long n) {
  vector<ll> is_prime(n + 1, true);
  for (ll i = 2; i * i <= n; i++) {
    if (is_prime[i]) {
      for (ll j = i + i; j <= n + 1; j += i) {
        is_prime[j] = false;
      }
    }
  }
  for (ll i = 2; i < is_prime.size(); i++) {
    if (is_prime[i]) {
      prime.push_back(i);
    }
  }
  return prime;
}

int main() {  // TODO
  int N;
  cin >> N;
  vector<ll> A(1000005, 0);
  vector<ll> V(N);
  ll gmax = -1;
  rep(N) {
    ll a;
    cin >> a;
    gmax = max(gmax, a);
    A[a] = 1;
    V[i] = a;
  }

  bool is_pc = true;
  for (auto p : eratosthenes(gmax)) {
    ll tmp = 0;
    for (ll i = p; i < gmax; i += p) {
      tmp += A[i];
    }
    if (tmp > 1) {
      is_pc = false;
      break;
    }
  }

  if (is_pc == true) {
    cout << "pairwise coprime" << endl;
    return 0;
  }

  ll g = 0;
  for (ll i = 0; i < N; i++) {
    g = __gcd(g, V[i]);
  }

  if (g == 1) {
    cout << "setwise coprime" << endl;
  } else {
    cout << "not coprime" << endl;
  }
  return 0;
}