#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;
}
vector<long long> enum_divisors(long long N) {
  vector<long long> res;
  for (long long i = 1; i * i <= N; ++i) {
    if (N % i == 0) {
      res.push_back(i);
      if (N / i != i) res.push_back(N / i);
    }
  }
  return res;
}
int main() {
  int N;
  cin >> N;
  vector<bool> exists(1000002);
  set<long long> setwisec;
  bool pairwise = true;
  bool setwise = false;
  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<long long> D = enum_divisors(A[i]);
    for (int j = 0; j < (D.size()); ++j) {
      long long NowDiv = D[j];
      if (NowDiv == 1) continue;
      if (exists[NowDiv]) pairwise = false;
      exists[NowDiv] = true;
      if (i == 0) {
        setwisec.insert(NowDiv);
      }
    }
  }
  if (setwisec.empty()) setwise = true;
  if (pairwise) {
    puts("pairwise coprime");
  } else if (setwise) {
    puts("setwise coprime");
  } else {
    puts("not coprime");
  }
}
