#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const long double PI = acos(-1.0);
const int MOD = 1e9 + 7;
std::vector<int> Eratosthenes(const int N) {
  std::vector<bool> is_prime(N + 1);
  for (int i = 0; i <= N; i++) {
    is_prime[i] = true;
  }
  std::vector<int> P;
  for (int i = 2; i <= N; i++) {
    if (is_prime[i]) {
      for (int j = 2 * i; j <= N; j += i) {
        is_prime[j] = false;
      }
      P.emplace_back(i);
    }
  }
  return P;
}
int main() {
  int n;
  cin >> n;
  int a[n];
  int mx = -1;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    if (mx < a[i]) mx = a[i];
  }
  vector<int> v = Eratosthenes((int)sqrt(mx));
  int ans = -1;
  for (auto x : v) {
    int cntzero = 0;
    for (int i = 0; i < n; i++) {
      if (a[i] % x == 0) cntzero++;
    }
    if (cntzero == n) {
      cout << "not coprime" << endl;
      return 0;
    }
    if (cntzero >= 2) {
      cout << "setwise coprime" << endl;
      return 0;
    }
  }
  cout << "pairwise coprime" << endl;
  return 0;
}
