#include <bits/stdc++.h>
template <class T>
inline bool chmin(T& a, T b) {
  if (a > b) {
    a = b;
    return true;
  }
  return false;
}
template <class T>
inline bool chmax(T& a, T b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
}
using namespace std;
using ll = long long;
using P = pair<int, int>;
using Pl = pair<long long, long long>;
using veci = vector<int>;
using vecl = vector<long long>;
using vecveci = vector<vector<int>>;
using vecvecl = vector<vector<long long>>;
const int MOD = 1000000009;
const double pi = acos(-1);
vector<long long> enum_divisors(long long N) {
  vector<long long> res;
  for (long long i = 2; i * i <= N; ++i) {
    if (N % i == 0) {
      res.push_back(i);
      if (N / i != i) res.push_back(N / i);
    }
  }
  res.push_back(N);
  sort(res.begin(), res.end());
  return res;
}
veci res(1000010);
ll gcd(ll a, ll b) {
  if (b == 0)
    return a;
  else
    return gcd(b, a % b);
}
int main() {
  int N;
  cin >> N;
  vecvecl factors(N);
  vecl A(N);
  ll g = 0;
  for (int i = 0; i < (N); ++i) {
    ll a;
    cin >> a;
    A[i] = a;
    factors[i] = enum_divisors(a);
    for (ll a : factors[i]) res[a]++;
  }
  for (int i = 0; i < (N); ++i) g = gcd(g, A[i]);
  bool go = true;
  for (int i = 0; i < (N); ++i) {
    bool ok = true;
    for (ll a : factors[i]) {
      if (res[a] - 1 != 0) ok = false;
    }
    if (!ok) go = false;
  }
  if (go)
    cout << "pairwise coprime" << endl;
  else if (g == 1)
    cout << "setwise coprime" << endl;
  else
    cout << "not coprime" << endl;
}
