#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1e9 + 7;
template <class T>
void chmin(T &a, const T &b) {
  if (a > b) a = b;
}
template <class T>
void chmax(T &a, const T &b) {
  if (a < b) a = b;
}
long long gcd(long long a, long long b) { return b == 0 ? a : gcd(b, a % b); }
int L = 1e6;
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  int N;
  cin >> N;
  vector<long long> A(N);
  for (int i = 0; i < (N); ++i) cin >> A[i];
  int g = A[0];
  for (int i = 0; i < (N); ++i) g = gcd(g, A[i]);
  if (g != 1) {
    cout << "not coprime" << endl;
    return 0;
  }
  vector<int> num(L + 1, 0);
  for (int i = 0; i < (N); ++i) num[A[i]] = 1;
  vector<int> prime(L + 1, 1);
  prime[1] = 0;
  for (int i = 2; i <= L; i++) {
    if (prime[i] == 0) continue;
    for (int j = 2; i * j <= L; j++) prime[i * j] = 0;
  }
  for (int i = 1; i <= L; i++) {
    if (prime[i] == 0) continue;
    int res = 0;
    for (int j = 2; i * j <= L; j++) {
      if (num[i * j]) res++;
    }
    if (res >= 2) {
      cout << "setwise coprime" << endl;
      return 0;
    }
  }
  cout << "pairwise coprime" << endl;
  return 0;
}
