#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ull = unsigned long long;
using pii = pair<int, int>;
int_fast64_t gcd(int_fast64_t a, int_fast64_t b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
int_fast64_t lcm(int_fast64_t a, int_fast64_t b) { return a / gcd(a, b) * b; }
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int N;
  cin >> N;
  vector<int> A(N);
  for (int i = 0; i < N; i++) cin >> A[i];
  int memo = A[0];
  bool pairwise = true;
  for (int i = 0; i < N - 1; i++) {
    if (gcd(memo, A[i + 1]) != 1) pairwise = false;
    memo = lcm(memo, A[i + 1]);
  }
  int GCD = A[0];
  for (int i = 0; i < N - 1; i++) GCD = gcd(GCD, A[i + 1]);
  bool setwise = (GCD == 1);
  if (pairwise)
    cout << "pairwise coprime"
         << "\n";
  else if (setwise)
    cout << "setwise coprime"
         << "\n";
  else
    cout << "not coprime"
         << "\n";
  return 0;
}
