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

// boost
#include <boost/multiprecision/cpp_int.hpp>
using boost::multiprecision::cpp_int;

using ll = long long;
using ld = long double;

using vi = vector<int>;
using vvi = vector<vi>;
using vll = vector<ll>;
using vvll = vector<vll>;
using vb = vector<bool>;
using vs = vector<string>;
using vld = vector<ld>;
using vvld = vector<vld>;

typedef pair<ll, ll> P;

#define bit(n) (1LL << (n))

//#define int long long

#define all(v) v.begin(), v.end()

#define rep(i, n) for (ll i = 0; i < n; i++)
#define REP(i, n) for (ll i = 1; i < n; i++)

#define FOR(i, a, b) for (ll i = (a); i < (b); i++)
#define FORm(i, m) for (auto i = m.begin(); i != m.end(); i++)

template <class T>
inline void chmax(T& a, T b) {
  a = std::max(a, b);
}
template <class T>
inline void chmin(T& a, T b) {
  a = std::min(a, b);
}

#define mod (ll)(1e9 + 7)
// #define mod (998244353ll)

const long long INF = 1LL << 60;

bool is_prime(const unsigned n) {
  if (n % 2 == 0 || n % 3 == 0) {
    if (n == 2 || n == 3) {
      return true;
    }
    return false;
  }
  if (n == 1) {
    return false;
  }

  for (unsigned i = 5; i * i <= n; i += 6) {
    if (n % i == 0 || n % (i + 2) == 0) {
      return false;
    }
  }

  return true;
}

// prime factorization (素因数分解)
// key: value of prime factor
// value: number of prime factor
std::map<ll, ll> prime_factorization(ll n) {
  std::map<ll, ll> prime_factors;
  for (ll i = 2; i * i <= n; i++) {
    while (n % i == 0) {
      prime_factors[i]++;
      n /= i;
    }
  }
  if (n != 1)
    prime_factors[n] = 1;
  return prime_factors;
}

// 約数リスト
vector<ll> get_divisors(const ll n) {
  vector<ll> divs;
  for (ll i = 1; i * i <= n; i++) {
    if (n % i == 0) {
      divs.push_back(i);
      if (i != n / i) {
        divs.push_back(n / i);
      }
    }
  }

  // 必要に応じてソート
  // sort(divs.begin(), divs.end());

  return divs;
}

// Euler's-Phi-Function
// 1からnまでの自然数のうちnと互いに素なものの個数
ll eular_phi(ll n) {
  ll ans = n;

  auto primes = prime_factorization(n);
  for (const auto& it : primes) {
    ans -= ans / it.first;
  }

  return ans;
}

signed main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  cout << fixed << setprecision(20);

  ll n;
  cin >> n;
  vll a(n);
  rep(i, n) cin >> a[i];

  set<ll> primes;

  bool is_pairwise = true;

  rep(i, n) {
    auto pf = prime_factorization(a[i]);
    for (auto& p : pf) {
      auto it = primes.lower_bound(p.first);
      if (it != primes.end() && *it == p.first) {
        is_pairwise = false;
      } else {
        primes.insert(p.first);
      }
    }
  }

  ll all_gcd = a[0];
  rep(i, n) {
    all_gcd = gcd(all_gcd, a[i]);
  }

  if (is_pairwise) {
    cout << "pairwise coprime" << endl;
  } else if (all_gcd == 1) {
    cout << "setwise coprime" << endl;
  } else {
    cout << "not coprime" << endl;
  }

  return 0;
}
