#include <bits/stdc++.h>
using namespace std;
template <class T>
long long size(const T& x) {
  return x.size();
}
template <class T>
T smod(T a, T b) {
  return (a % b + b) % b;
}
set<long long> get_prime_fact(long long in) {
  set<long long> ans;
  long long a = in;
  for (long long i = (2); i < (sqrt(a) + 1); ++i) {
    while (a % i == 0) {
      ans.insert(i);
      a /= i;
    }
  }
  if (a != 1) {
    ans.insert(a);
  }
  return ans;
}
int cnt[1000010] = {0};
void solve() {
  int n;
  cin >> n;
  vector<long long> A(n);
  for (long long i = (0); i < (n); ++i) {
    cin >> A[i];
  }
  set<long long> used;
  for (long long i = (0); i < (n); ++i) {
    set<long long> ans = get_prime_fact(A[i]);
    for (auto it = (ans).begin(); it != (ans).end(); ++it) {
      used.insert(*it);
      cnt[(*it)]++;
    }
    ans.clear();
  }
  bool is_coprime = true;
  for (auto it = (used).begin(); it != (used).end(); ++it) {
    if (cnt[(*it)] > 1) {
      is_coprime = false;
    }
  }
  if (is_coprime) {
    cout << "pairwise coprime" << endl;
    return;
  }
  bool is_setprime = true;
  for (auto it = (used).begin(); it != (used).end(); ++it) {
    if (cnt[(*it)] == n) {
      is_setprime = false;
    }
  }
  if (is_setprime) {
    cout << "setwise coprime" << endl;
    return;
  } else {
    cout << "not coprime" << endl;
  }
}
int main() {
  cin.sync_with_stdio(false);
  cin.tie(nullptr);
  cout.tie(nullptr);
  solve();
}
