#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
using namespace std;
using ll = long long;
using ld = long double;
using VI = vector<ll>;
using VV = vector<VI>;
using VS = vector<string>;
using PII = pair<ll, ll>;
template <typename A, typename B>
string to_string(pair<A, B> p);
template <typename A, typename B, typename C>
string to_string(tuple<A, B, C> p);
template <typename A, typename B, typename C, typename D>
string to_string(tuple<A, B, C, D> p);
string to_string(const string& s) { return '"' + s + '"'; }
string to_string(const char* s) { return to_string((string)s); }
string to_string(bool b) { return (b ? "true" : "false"); }
string to_string(vector<bool> v) {
  bool first = true;
  string res = "{";
  for (int i = 0; i < static_cast<int>(v.size()); i++) {
    if (!first) {
      res += ", ";
    }
    first = false;
    res += to_string(v[i]);
  }
  res += "}";
  return res;
}
template <size_t N>
string to_string(bitset<N> v) {
  string res = "";
  for (size_t i = 0; i < N; i++) {
    res += static_cast<char>('0' + v[i]);
  }
  return res;
}
template <typename A>
string to_string(A v) {
  bool first = true;
  string res = "{";
  for (const auto& x : v) {
    if (!first) {
      res += ", ";
    }
    first = false;
    res += to_string(x);
  }
  res += "}";
  return res;
}
template <typename A, typename B>
string to_string(pair<A, B> p) {
  return "(" + to_string(p.first) + ", " + to_string(p.second) + ")";
}
template <typename A, typename B, typename C>
string to_string(tuple<A, B, C> p) {
  return "(" + to_string(get<0>(p)) + ", " + to_string(get<1>(p)) + ", " +
         to_string(get<2>(p)) + ")";
}
template <typename A, typename B, typename C, typename D>
string to_string(tuple<A, B, C, D> p) {
  return "(" + to_string(get<0>(p)) + ", " + to_string(get<1>(p)) + ", " +
         to_string(get<2>(p)) + ", " + to_string(get<3>(p)) + ")";
}
void debug_out() { cerr << '\n'; }
template <typename Head, typename... Tail>
void debug_out(Head H, Tail... T) {
  cerr << " " << to_string(H);
  debug_out(T...);
}
template <class T>
bool chmax(T& a, const T& b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T>
bool chmin(T& a, const T& b) {
  if (b < a) {
    a = b;
    return 1;
  }
  return 0;
}
ll SUM(VI& V) { return accumulate((V).begin(), (V).end(), 0LL); }
ll MIN(VI& V) { return *min_element((V).begin(), (V).end()); }
ll MAX(VI& V) { return *max_element((V).begin(), (V).end()); }
void print_vector(VI& V) {
  ll n = V.size();
  for (ll i = (0); i < (n); ++i) {
    if (i) cout << ' ';
    cout << V[i];
  }
  cout << endl;
}
ll gcd(ll a, ll b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
ll lcm(ll a, ll b) {
  ll g = gcd(a, b);
  return a / g * b;
}
using ld = long double;
void no() {
  cout << ("NO") << '\n';
  exit(0);
}
void yes() {
  cout << ("YES") << '\n';
  exit(0);
}
const ll mod = 1e9 + 7;
const ll inf = 1e18;
const double PI = acos(-1);
struct mint {
  ll x;
  mint(ll x = 0) : x((x % mod + mod) % mod) {}
  mint operator-() const { return mint(-x); }
  mint& operator+=(const mint a) {
    if ((x += a.x) >= mod) x -= mod;
    return *this;
  }
  mint& operator-=(const mint a) {
    if ((x += mod - a.x) >= mod) x -= mod;
    return *this;
  }
  mint& operator*=(const mint a) {
    (x *= a.x) %= mod;
    return *this;
  }
  mint operator+(const mint a) const {
    mint res(*this);
    return res += a;
  }
  mint operator-(const mint a) const {
    mint res(*this);
    return res -= a;
  }
  mint operator*(const mint a) const {
    mint res(*this);
    return res *= a;
  }
  mint pow(ll t) const {
    if (!t) return 1;
    mint a = pow(t >> 1);
    a *= a;
    if (t & 1) a *= *this;
    return a;
  }
  mint inv() const { return pow(mod - 2); }
  mint& operator/=(const mint a) { return (*this) *= a.inv(); }
  mint operator/(const mint a) const {
    mint res(*this);
    return res /= a;
  }
};
const int N_MAX = 1000050;
ll spf[N_MAX];
void prepare_factorize() {
  for (ll i = (0); i < (N_MAX); ++i) spf[i] = i;
  for (int p = 2; p * p <= N_MAX; p++) {
    for (int i = p; i < N_MAX; i += p) {
      if (spf[i] == i) spf[i] = p;
    }
  }
}
map<ll, ll> factorize_fast(ll n) {
  if (spf[1] == 0) {
    cout << ("please initialize") << '\n';
    exit(0);
  }
  map<ll, ll> mp;
  while (n != 1) {
    ll p = spf[n];
    mp[p]++;
    n /= p;
  }
  return mp;
}
map<ll, ll> factorize(ll n) {
  map<ll, ll> mp;
  ll sq = sqrt(n);
  for (ll i = (2); i < (sq + 1); ++i) {
    while (n % i == 0) {
      mp[i]++;
      n /= i;
    }
  }
  if (n != 1) {
    mp[n]++;
  }
  return mp;
}
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  ll N;
  cin >> N;
  VI A(N);
  for (ll i = (0); i < (N); ++i) cin >> A[i];
  if (MAX(A) == 1) {
    cout << ("pairwise coprime") << '\n';
    exit(0);
  }
  VI C(1000010);
  for (ll a : A) {
    auto mp = factorize(a);
    for (auto pa : mp) {
      ll v = pa.first;
      if (v == 1) continue;
      C[v]++;
    }
  }
  if (MAX(C) == 1) {
    cout << ("pairwise coprime") << '\n';
    exit(0);
  }
  ll g = 0;
  for (ll a : A) {
    g = gcd(g, a);
  }
  if (g == 1) {
    cout << ("setwise coprime") << '\n';
  } else {
    cout << ("not coprime") << '\n';
  }
  return 0;
}
