#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ull = unsigned long long;
constexpr ll LLINF{1001002003004005006};
constexpr int INTINF{1000000000};
template <typename T>
void maxs(T& x, T&& y) {
  x = std::max(x, y);
}
template <typename T>
void maxs(T& x, T& y) {
  x = std::max(x, y);
}
template <typename T>
void mins(T& x, T&& y) {
  x = std::min(x, y);
}
template <typename T>
void mins(T& x, T& y) {
  x = std::min(x, y);
}
int main() {
  ios::sync_with_stdio(false);
  std::cin.tie(nullptr);
  int n;
  cin >> n;
  vector<ll> a(n);
  for (int i = 0; i < (n); ++i) cin >> a[i];
  int max_prime_cnt{};
  vector<int> prime(1000 + 1, 1);
  prime[0] = prime[1] = 0;
  for (auto i = 0; i < 1000 + 1; ++i) {
    if (prime[i] == 0) continue;
    for (auto j = i + i; j < 1000 + 1; j += i) {
      prime[j] = 0;
    }
  }
  vector<int> prime_number;
  for (auto i = 0; i < 1000 + 1; ++i) {
    if (prime[i] == 1) prime_number.push_back(i);
  }
  vector<vector<int>> p_table(n, vector<int>(prime_number.size(), 0));
  for (int i = 0; i < (n); ++i) {
    for (int j = 0; j < (prime_number.size()); ++j) {
      if (a[i] % prime_number[j] == 0) {
        p_table[i][j] = 1;
        while (a[i] % prime_number[j] == 0) a[i] /= prime_number[j];
      }
    }
  }
  int prime_number_size = prime_number.size();
  vector<int> table(prime_number_size, 0);
  for (int i = 0; i < (n); ++i) {
    for (int j = 0; j < (prime_number_size); ++j) table[j] += p_table[i][j];
  }
  bool pair_wise{true};
  bool set_wise{true};
  for (int i = 0; i < (prime_number_size); ++i) {
    if (table[i] == n) {
      pair_wise = false;
      set_wise = false;
      break;
    } else if (table[i] > 1) {
      pair_wise = false;
    }
  }
  sort(a.begin(), a.end());
  for (int i = 0; i < (n - 1); ++i) {
    if (a[i] == a[i + 1]) pair_wise = false;
  }
  for (int i = 0; i < (n - 1); ++i) {
    if (a[i] != a[i + 1]) break;
    if (i == n - 2) set_wise = false;
  }
  if (pair_wise == true) {
    cout << "pairwise coprime\n";
  } else if (set_wise == true) {
    cout << "setwise coprime\n";
  } else {
    cout << "not coprime\n";
  }
}
