#include <bits/stdc++.h>
using namespace std;
const long long mod = 1000000007;
const long long INF = mod * mod;
const long double eps = 1e-12;
const long double pi = acos(-1.0);
long long qp(long long a, long long b, int mo) {
  int ans = 1;
  do {
    if (b & 1) ans = 1ll * ans * a % mo;
    a = 1ll * a * a % mo;
  } while (b >>= 1);
  return ans;
}
long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }
long long lcm(long long a, long long b) { return a / gcd(a, b) * b; }
int dx[4] = {0, 1, 0, -1};
int dy[4] = {1, 0, -1, 0};
template <typename T>
istream &operator>>(istream &is, vector<T> &vector<long long>) {
  for (auto &v : vector<long long>) is >> v;
  return is;
}
template <typename T>
ostream &operator<<(ostream &os, const vector<T> &vector<long long>) {
  os << "[";
  for (auto v : vector<long long>) os << v << ",";
  os << "]";
  return os;
}
template <typename T>
ostream &operator<<(ostream &os, const deque<T> &vector<long long>) {
  os << "deq[";
  for (auto v : vector<long long>) os << v << ",";
  os << "]";
  return os;
}
template <typename T>
ostream &operator<<(ostream &os, const set<T> &vector<long long>) {
  os << "{";
  for (auto v : vector<long long>) os << v << ",";
  os << "}";
  return os;
}
template <typename T>
ostream &operator<<(ostream &os, const unordered_set<T> &vector<long long>) {
  os << "{";
  for (auto v : vector<long long>) os << v << ",";
  os << "}";
  return os;
}
template <typename T>
ostream &operator<<(ostream &os, const multiset<T> &vector<long long>) {
  os << "{";
  for (auto v : vector<long long>) os << v << ",";
  os << "}";
  return os;
}
template <typename T>
ostream &operator<<(ostream &os,
                    const unordered_multiset<T> &vector<long long>) {
  os << "{";
  for (auto v : vector<long long>) os << v << ",";
  os << "}";
  return os;
}
template <typename T1, typename T2>
ostream &operator<<(ostream &os, const pair<T1, T2> &pa) {
  os << "(" << pa.first << "," << pa.second << ")";
  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 ndarray(vector<T> &vector<long long>, int len) {
  vector<long long>.resize(len);
}
template <typename T, typename... Args>
void ndarray(vector<T> &vector<long long>, int len, Args... args) {
  vector<long long>.resize(len);
  for (auto &v : vector<long long>) ndarray(v, args...);
}
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 (q < m) {
    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 make_pair(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 make_pair(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);
}
template <typename T1, typename T2>
pair<T1, T2> operator>(const pair<T1, T2> l, const pair<T1, T2> r) {
  return (l.first > r.first);
}
long long max_prime_num = 78498;
vector<int> prime_all(int n) {
  vector<int> prime;
  bool is_prime[n + 1];
  int p = 0;
  for (int i = 0; i <= n; i++) is_prime[i] = true;
  is_prime[0] = is_prime[1] = false;
  for (int i = 2; i <= n; i++) {
    if (is_prime[i]) {
      prime.push_back(i);
      p++;
      for (int j = 2 * i; j <= n; j += i) is_prime[j] = false;
    }
  }
  return prime;
}
map<int, int> prime_factor(int n) {
  map<int, int> res;
  for (int i = 2; i * i <= n; i++) {
    while (n % i == 0) {
      ++res[i];
      n /= i;
    }
  }
  if (n != 1) res[n] = 1;
  return res;
}
void solve() {
  int N;
  cin >> N;
  bool pair_flg = true;
  bool set_flg = true;
  unordered_map<int, int> ch;
  set<int> num;
  int max = 1;
  vector<int> v;
  for (int i = 0; i < N; i++) {
    int a;
    cin >> a;
    if (a == 1) continue;
    if (ch[a] > 0)
      pair_flg = false;
    else
      v.push_back(a);
    ch[a]++;
    num.insert(a);
    chmax(max, a);
  }
  sort((v).begin(), (v).end());
  vector<int> prime = prime_all(max);
  int n = num.size();
  if (n > prime.size()) pair_flg = false;
  if (!pair_flg) {
    map<int, int> m = prime_factor(v[0]);
    for (auto a : m) {
      int c = 0;
      int n_ = v.size() - 1;
      for (int i = 1; i <= n_; i++) {
        if (v[i] % a.first == 0) c++;
      }
      if (c == n_) {
        set_flg = false;
        break;
      }
    }
  } else {
    for (auto p : prime) {
      int tmp = 0;
      for (auto n : num) {
        if (n % p == 0) {
          if (tmp > 0) {
            pair_flg = false;
          }
          tmp++;
        }
      }
      if (tmp == n) {
        set_flg = false;
        break;
      }
    }
  }
  if (pair_flg)
    cout << "pairwise coprime" << endl;
  else if (set_flg)
    cout << "setwise coprime" << endl;
  else
    cout << "not coprime" << endl;
}
signed main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  std::cout << fixed << setprecision(10);
  solve();
  return 0;
}
