#include <bits/stdc++.h>
using namespace std;
template <class T>
inline int out(const T &t) {
  print(t);
  putchar('\n');
  return 0;
}
bool is_palindrome(string s) { return s == string(s.rbegin(), s.rend()); }
const long long INF = 1e18;
template <class T>
inline bool chmax(T &a, T b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
}
template <class T>
inline bool chmin(T &a, T b) {
  if (a > b) {
    a = b;
    return true;
  }
  return false;
}
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> pair<long long, long long>;
  for (int i = 2; i <= N; i++) {
    if (is_prime[i]) {
      for (int j = 2 * i; j <= N; j += i) {
        is_prime[j] = false;
      }
      pair<long long, long long>.emplace_back(i);
    }
  }
  return pair<long long, long long>;
}
int main() {
  long long N;
  scanf("%lld", &N);
  std::vector<long long> A(N);
  for (int i = 0; i < N; i++) {
    scanf("%lld", &A[i]);
  }
  long long ma = *max_element(A.begin(), A.end());
  vector<int> v;
  v = Eratosthenes(1e3);
  string s = "pairwise coprime";
  for (long long i = 0; i < v.size(); i++) {
    long long cnt = 0;
    for (long long j = 0; j < N; j++) {
      if (A[j] % v[i] == 0) cnt++;
    }
    if (cnt == N) {
      s = "not coprime";
      break;
    } else if (1 < cnt && cnt < N) {
      s = "setwise coprime";
      break;
    }
  }
  cout << s << endl;
  return 0;
}
