#include <bits/stdc++.h>
template <typename T>
void view(T e) {
  std::cout << e << std::endl;
}
template <typename T>
void view(const std::vector<T>& v) {
  for (const auto& e : v) {
    std::cout << e << " ";
  }
  std::cout << std::endl;
}
template <typename T>
void view(const std::vector<std::vector<T>>& vv) {
  for (const auto& v : vv) {
    view(v);
  }
}
template <class T>
inline bool chmax(T& a, T b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T>
inline bool chmin(T& a, T b) {
  if (a > b) {
    a = b;
    return 1;
  }
  return 0;
}
using namespace std;
using ll = long long;
using vi = vector<int>;
using vl = vector<ll>;
using vvi = vector<vector<int>>;
using vvl = vector<vector<ll>>;
long long gcd(long long a, long long b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
vector<long long> divisor(long long n) {
  vector<long long> res;
  for (long long i = 1; i * i <= n; ++i) {
    if (n % i == 0) {
      res.push_back(i);
      if (i != n / i) res.push_back(n / i);
    }
  }
  return res;
}
struct SieveOfEstosthenes {
  int n;
  vector<bool> is_prime;
  vector<int> prime;
  SieveOfEstosthenes(int n) : n(n), is_prime(n, true) {
    is_prime[0] = is_prime[1] = false;
    for (int i = 2; i <= n; ++i) {
      if (is_prime[i]) {
        prime.push_back(i);
        for (int j = 2 * i; j <= n; j += i) is_prime[j] = false;
      }
    }
  }
};
void Main() {
  int N;
  cin >> N;
  vl A(N);
  ll m = 1;
  for (int i = (0); i < (N); ++i) {
    cin >> A[i];
    m = max(m, A[i]);
  }
  vi cnt(m + 1);
  SieveOfEstosthenes era(m + 1);
  bool pairwise = true;
  for (int i = (0); i < (N); ++i) {
    ll n = A[i];
    for (long long j = 1; j * j <= n; ++j) {
      if (n % j == 0) {
        if (cnt[j] == 1 && era.is_prime[j]) {
          pairwise = false;
          goto NOT_PAR;
        }
        cnt[j]++;
        if (j != n / j) {
          if (cnt[n / j] == 1 && era.is_prime[j]) {
            pairwise = false;
            goto NOT_PAR;
          }
          cnt[n / j]++;
        };
      }
    }
  }
NOT_PAR:
  if (pairwise) {
    cout << "pairwise coprime" << endl;
    return;
  }
  ll g = A[0];
  for (int i = (1); i < (N); ++i) {
    g = gcd(g, A[i]);
  }
  bool setwise = g == 1;
  if (setwise) {
    cout << "setwise coprime" << endl;
    return;
  }
  cout << "not coprime" << endl;
}
int main() {
  cin.tie(nullptr);
  ios_base::sync_with_stdio(false);
  cout << fixed << setprecision(15);
  Main();
}
