#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1e9 + 7;
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;
}
std::vector<int> sieve(int n) {
  std::vector<int> res(n);
  std::iota(res.begin(), res.end(), 0);
  for (int i = 2; i * i < n; ++i) {
    if (res[i] < i) continue;
    for (int j = i * i; j < n; j += i)
      if (res[j] == j) res[j] = i;
  }
  return res;
}
std::vector<int> factor(int n, const std::vector<int> &min_factor) {
  std::vector<int> res;
  while (n > 1) {
    res.push_back(min_factor[n]);
    n /= min_factor[n];
  }
  return res;
}
int main() {
  int N;
  cin >> N;
  vector<int> exists(1000002, -1);
  set<long long> setwisec;
  bool pairwise = true;
  bool setwise = false;
  vector<int> sieves = sieve(1000000);
  vector<long long> A(N);
  for (int i = 0; i < (N); ++i) {
    cin >> A[i];
  }
  for (int i = 0; i < (N); ++i) {
    for (auto x : setwisec) {
      if (A[i] % x != 0) setwisec.erase(x);
    }
    vector<int> D = factor(A[i], sieves);
    for (auto x : D) {
      cerr << "("
           << "i"
           << ", "
           << "x"
           << ") = (" << i << ", " << x << ")\n";
      ;
    }
    for (int j = 0; j < (D.size()); ++j) {
      long long NowDiv = D[j];
      if (NowDiv == 1) continue;
      if (i == 0) {
        setwisec.insert(NowDiv);
      }
      if ((exists[NowDiv] != i) and (exists[NowDiv] != -1)) pairwise = false;
      exists[NowDiv] = i;
    }
  }
  if (setwisec.empty()) setwise = true;
  if (pairwise) {
    puts("pairwise coprime");
  } else if (setwise) {
    puts("setwise coprime");
  } else {
    puts("not coprime");
  }
}
