#include <bits/stdc++.h>
using namespace std;
using Edge = pair<long long, long long>;
using Graph = vector<vector<int>>;
inline int toInt(string s) {
  int v;
  istringstream sin(s);
  sin >> v;
  return v;
}
template <class T>
inline string toString(T x) {
  ostringstream sout;
  sout << x;
  return sout.str();
}
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;
}
const int dx[4] = {0, 1, 0, -1}, dy[4] = {1, 0, -1, 0};
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; }
vector<long long> PP;
void Eratosthenes_init(long long n) {
  vector<bool> is_prime(n + 1);
  for (long long i = 0; i <= n; ++i) is_prime[i] = true;
  for (long long i = 2; i <= n; ++i) {
    if (is_prime[i]) {
      for (long long j = 2 * i; j <= n; j += i) {
        is_prime[j] = false;
      }
      PP.emplace_back(i);
    }
  }
}
int main() {
  long long N;
  cin >> N;
  long long A[N];
  map<long long, long long> Mcnt;
  for (int i = (0); i < (N); ++i) cin >> A[i], Mcnt[A[i]]++;
  long long ggcd = A[0];
  for (int i = (1); i <= (N - 1); ++i) ggcd = gcd(ggcd, A[i]);
  if (ggcd > 1) {
    cout << "not coprime" << '\n';
    return 0;
  }
  bool CAN = true;
  for (auto &v : Mcnt) {
    if (v.second > 1) {
      cout << "setwise coprime" << '\n';
      return 0;
    }
  }
  Eratosthenes_init(1010101);
  for (auto &v : PP) {
    long long cnt = 0;
    for (int i = (0); i < (N); ++i)
      if (A[i] % v == 0) cnt++;
    if (cnt > 1) CAN = false;
  }
  if (CAN)
    cout << "pairwise coprime" << '\n';
  else
    cout << "setwise coprime" << '\n';
  return 0;
}
