#include <bits/stdc++.h>
using namespace std;
int dx[4] = {1, 0, -1, 0};
int dy[4] = {0, 1, 0, -1};
vector<pair<long long, long long>> prime_fact(long long x) {
  long long i = 2;
  vector<pair<long long, long long>> ans;
  while (i * i <= x) {
    long long tmp = 0;
    while (x % i == 0) {
      tmp++;
      x /= i;
    }
    if (tmp != 0) {
      ans.push_back(make_pair(i, tmp));
    }
    i++;
  }
  if (x != 1) ans.push_back(make_pair(x, 1));
  return ans;
}
long long gcd(long long x, long long y) {
  while (y > 0) {
    long long tmp = y;
    y = x % y;
    x = tmp;
  }
  return x;
}
int main() {
  long long N;
  cin >> N;
  vector<long long> A(N);
  for (int i = 0; i < N; i++) cin >> A[i];
  vector<long long> used(100001, 0);
  bool p_ans = true;
  for (int i = 0; i < N; i++) {
    vector<pair<long long, long long>> now;
    now = prime_fact(A[i]);
    for (int i = 0; i < now.size(); i++) {
      if (used[now[i].first] >= 1)
        p_ans = false;
      else
        used[now[i].first]++;
    }
    if (p_ans == false) break;
  }
  long long now = A[0];
  for (int i = 1; i < N; i++) {
    now = gcd(now, A[i]);
  }
  long long s_ans = false;
  if (now == 1) s_ans = true;
  if (p_ans)
    cout << "pairwise coprime";
  else if (s_ans)
    cout << "setwise coprime";
  else
    cout << "not coprime";
  return 0;
}
