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

//////////////////////////////   Begin Macros

#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define in(x, a, b) (a <= x and x < b)
#define rep(i, N) for (int i = 0; i < (int)(N); i++)
#define reprev(i, N) for (int i = (int)(N)-1; i >= 0; i--)
#define rep1(i, N) for (int i = 1; i <= (int)(N); i++)
#define rep1rev(i, N) for (int i = (int)(N); i >= 0; i--)
#define forbe(i, b, e) for (int i = (b); i < (e); i++)
#define forberev(i, b, e) for (int i = (e)-1; i >= (b); i--)
#define forfl(i, f, l) for (int i = (f); i <= (l); i++)
#define forflrev(i, f, l) for (int i = (l); i >= (f); i--)
using ll = long long;
using pii = pair<int, int>;
using pil = pair<int, ll>;
using pli = pair<ll, int>;
using pll = pair<ll, ll>;

template <typename T>
bool chmax(T &m, const T q)
{
  if (m < q)
  {
    m = q;
    return true;
  }
  else
    return false;
}
template <typename T>
bool chmin(T &m, const T q)
{
  if (m > q)
  {
    m = q;
    return true;
  }
  else
    return false;
}
template <typename T1, typename T2>
pair<T1, T2> operator+(const pair<T1, T2> &l, const pair<T1, T2> &r) { return {l.first + r.first, l.second + r.second}; }
template <typename T1, typename T2>
pair<T1, T2> operator-(const pair<T1, T2> &l, const pair<T1, T2> &r) { return {l.first - r.first, l.second - r.second}; }
template <typename T>
pair<T, T> operator*(const pair<T, T> &l, const T &r) { return {l.first * r, l.second * r}; }
template <typename T>
pair<T, T> operator/(const pair<T, T> &l, const T &r) { return {l.first / r, l.second / r}; }
template <typename T>
istream &operator>>(istream &is, vector<T> &vec)
{
  for (auto &v : vec)
    is >> v;
  return is;
}
template <typename T>
ostream &operator<<(ostream &os, const vector<T> &vec)
{
  os << "[";
  for (auto v : vec)
    os << v << ",";
  os << "]";
  return os;
}
template <typename T>
ostream &operator<<(ostream &os, const deque<T> &vec)
{
  os << "deq[";
  for (auto v : vec)
    os << v << ",";
  os << "]";
  return os;
}
template <typename T>
ostream &operator<<(ostream &os, const set<T> &vec)
{
  os << "{";
  for (auto v : vec)
    os << v << ",";
  os << "}";
  return os;
}
template <typename T>
ostream &operator<<(ostream &os, const unordered_set<T> &vec)
{
  os << "{";
  for (auto v : vec)
    os << v << ",";
  os << "}";
  return os;
}
template <typename T>
ostream &operator<<(ostream &os, const multiset<T> &vec)
{
  os << "{";
  for (auto v : vec)
    os << v << ",";
  os << "}";
  return os;
}
template <typename T>
ostream &operator<<(ostream &os, const unordered_multiset<T> &vec)
{
  os << "{";
  for (auto v : vec)
    os << v << ",";
  os << "}";
  return os;
}
template <typename T1, typename T2>
istream &operator>>(istream &is, pair<T1, T2> &pa)
{
  is >> pa.first >> pa.second;
  return is;
}
template <typename T1, typename T2>
ostream &operator<<(ostream &os, const pair<T1, T2> &pa)
{
  os << "(" << pa.first << "," << pa.second << ")";
  return os;
}
template <typename... Ts>
istream &operator>>(istream &is, tuple<Ts...> &theTuple)
{
  apply([&is](Ts &... tupleArgs) { ((is >> tupleArgs), ...); }, theTuple);
  return is;
}
template <typename... Ts>
ostream &operator<<(ostream &os, const tuple<Ts...> &theTuple)
{
  apply([&os](const Ts &... tupleArgs) {
    os << '(';
    size_t n(0);
    ((os << tupleArgs << (++n < sizeof...(Ts) ? "," : "")), ...);
    os << ')';
  },
        theTuple);
  return os;
}
template <typename TK, typename TV>
ostream &operator<<(ostream &os, const map<TK, TV> &mp)
{
  os << "{";
  for (auto v : mp)
    os << v.first << "=>" << v.second << ",";
  os << "}";
  return os;
}
template <typename TK, typename TV>
ostream &operator<<(ostream &os, const unordered_map<TK, TV> &mp)
{
  os << "{";
  for (auto v : mp)
    os << v.first << "=>" << v.second << ",";
  os << "}";
  return os;
}

template <typename T>
void reset(vector<T> &v, const T reset_to)
{
  for (auto &x : v)
    x = reset_to;
}
inline int popcount(const unsigned int x) { return __builtin_popcount(x); }
#define dbg(x) cerr << #x << " = " << (x) << " (L" << __LINE__ << ") " << __FILE__ << endl;

ll nC2(ll n)
{
  return n * (n - 1) / 2;
}

const int intinf = numeric_limits<int>::max();
const ll llinf = numeric_limits<ll>::max();
const pii udlr[4] = {{1, 0}, {0, 1}, {-1, 0}, {0, -1}};

//////////////////////////////   End Macros

#pragma once

#include <algorithm>
#include <vector>
#include <unordered_map>
#include <cassert>

std::vector<bool> is_primes;
std::vector<int> primes;

using namespace std;

void set_is_primes(int n)
{
  //sieve_of_eratosthenes
  //O(n log n)
  assert(n >= 0);
  is_primes = vector<bool>(n + 1, true);
  for (int i = 0; i <= min(1, n); ++i)
    is_primes[i] = false;
  for (int i = 2; i * i <= n; ++i)
    if (is_primes[i])
      for (int j = i * i; j <= n; j += i)
        is_primes[j] = false;
}

void set_primes(int n)
{
  //sieve_of_eratosthenes
  //O(n log n)
  assert(n >= 0);
  primes = vector<int>(n + 1, 0);
  for (int i = 2; i <= n; ++i)
    primes[i] = i;
  for (int i = 2; i * i <= n; ++i)
    if (primes[i])
      for (int j = i * i; j <= n; j += i)
        primes[j] = 0;
  primes.erase(remove(primes.begin(), primes.end(), 0), primes.end());
}

vector<bool> make_is_prime_segments(const long long L, const long long R)
{
  // [L, R)
  // O((R-L) sqrt( R ) / log(R))
  vector<bool> is_prime_segments(R - L, true);
  for (const int p : primes)
  {
    if ((long long)p * p < R)
      break;

    long long j;
    if (p >= L)
      j = (long long)p * p;
    else if (L % p == 0)
      j = L;
    else
      j = L - (L % p) + p;
    for (; j < R; j += p)
      is_prime_segments[j - L] = false;
  }
  return is_prime_segments;
}

bool is_prime(const long long n, const bool is_using_is_primes = false)
{
  if (n <= 1)
    return false;
  for (int i = 2; (long long)i * i <= n; i++)
  {
    if (is_using_is_primes and !is_primes[i])
      continue;
    if (n % i == 0)
      return false;
  }
  return true;
}

vector<long long> make_divisors(const long long n)
{
  vector<long long> ans;
  for (long long i = 1; i * i <= n; i++)
    if (n % i == 0)
      ans.emplace_back(i);
  vector<long long> latter;
  const auto rit_b = ans.crbegin();
  const bool is_square = (*rit_b * *rit_b == n);
  for (auto rit = rit_b + (is_square ? 1 : 0), rit_e = ans.crend(); rit != rit_e; rit++)
    latter.emplace_back(n / *rit);
  ans.insert(ans.end(), latter.begin(), latter.end());
  return ans;
}

unordered_map<long long, int> make_prime_factors(long long n, const bool is_using_primes = false)
{
  //O(sqrt(n))
  assert(n > 0);
  unordered_map<long long, int> prime_factors;
  for (int i = 2; (long long)i * i <= n; i++)
  {
    if (is_using_primes and !is_primes[i])
      continue;
    while (n % i == 0)
    {
      ++prime_factors[i];
      n /= i;
    }
  }
  if (n > 1)
    ++prime_factors[n];
  return prime_factors;
}

void solve()
{
  int N;
  cin >> N;
  vector<int> A(N);
  cin >> A;

  set_primes(N);
  set<int> se;
  bool is_pairwise_coprime = true;
  for (auto p : primes)
  {
    int c = 0;
    rep(i, N)
    {
      if (A[i] % p == 0)
        c++;
    }
    if (c >= 2)
      is_pairwise_coprime = false;
  }

  if (is_pairwise_coprime)
  {
    cout << "pairwise coprime" << endl;
    return;
  }

  int g = A[0];
  forbe(i, 1, N)
  {
    g = gcd(g, A[i]);
  }
  if (g == 1)
  {
    cout << "setwise coprime" << endl;
    return;
  }
  cout << "not coprime" << endl;
}

int main()
{
  cerr << "start" << endl;
  // srand(time(0));
  cout << fixed << setprecision(15);

  solve();
  return 0;
}
