#include <bits/stdc++.h>
using namespace std;
const double EPS = 1e-9;
const int INF = int(2e9);
const long long LINF = long long(2e9) * long long(2e9);
template <class T, class C>
void chmax(T& a, C b) {
  a > b ?: a = b;
}
template <class T, class C>
void chmin(T& a, C b) {
  a < b ?: a = b;
}
unordered_map<int, long long> fact(int x) {
  int num = x;
  unordered_map<int, long long> ans;
  int a = 2;
  while (x >= a * a) {
    if (x % a == 0) {
      ans[a]++;
      x /= a;
    } else {
      a++;
    }
  }
  ans[x]++;
  return ans;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int N;
  cin >> N;
  vector<int> A(N);
  for (int i = 0; i < N; i++) cin >> A[i];
  bool is_all_one = true;
  for (int i = 0; i < N; i++) {
    if (A[i] != 1) {
      is_all_one = false;
    }
  }
  if (is_all_one) {
    cout << "pairwise coprime" << endl;
    return 0;
  }
  unordered_map<int, long long> p_cnt;
  long long max_cnt = 0;
  for (int i = 0; i < N; i++) {
    auto primes = fact(A[i]);
    for (auto& p : primes) {
      p_cnt[p.first]++;
      max_cnt = max(max_cnt, p_cnt[p.first]);
    }
  }
  if (max_cnt == 1) {
    cout << "pairwise coprime" << endl;
    return 0;
  }
  for (auto& p : p_cnt) {
    if (p.second == N) {
      cout << "not coprime" << endl;
      return 0;
    }
  }
  cout << "setwise coprime" << endl;
}
