#include <bits/stdc++.h>
using namespace std;
template <class T>
inline bool chmax(T &a, T b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
}
template <class T>
bool chmin(T &a, const T &b) {
  if (b < a) {
    a = b;
    return 1;
  }
  return 0;
}
const int INF = 1000000000;
long long GCD(long long a, long long b) {
  if (b == 0)
    return a;
  else
    return GCD(b, a % b);
}
vector<pair<long long, long long>> prime_factorize(long long N) {
  vector<pair<long long, long long>> res;
  for (long long a = 2; a * a <= N; ++a) {
    if (N % a != 0) continue;
    long long ex = 0;
    while (N % a == 0) {
      ++ex;
      N /= a;
    }
    res.push_back({a, ex});
  }
  if (N != 1) res.push_back({N, 1});
  return res;
}
int main() {
  int N;
  cin >> N;
  vector<int> A(N);
  vector<bool> nums(1e6 + 1);
  bool pairwise = true;
  bool setwise;
  long long gc = 0;
  for (int i = 0; i < N; i++) {
    cin >> A[i];
    gc = GCD(gc, A[i]);
    vector<pair<long long, long long>> primes = prime_factorize(A[i]);
    for (int j = 0; j < primes.size(); j++) {
      int pr, ex;
      pr = primes[j].first;
      if (nums[pr]) pairwise = false;
      nums[pr] = true;
    }
  }
  if (gc == 1) setwise = true;
  if (pairwise)
    cout << "pairwise coprime" << endl;
  else if (setwise)
    cout << "setwise coprime" << endl;
  else
    cout << "not coprime" << endl;
}
