#include <bits/stdc++.h>
using namespace std;
template <typename A, typename B>
inline bool chmax(A &a, B b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
template <typename A, typename B>
inline bool chmin(A &a, B b) {
  if (a > b) {
    a = b;
    return 1;
  }
  return 0;
}
using ll = long long;
using pii = pair<int, int>;
constexpr ll INF = 1ll << 30;
constexpr ll longINF = 1ll << 60;
constexpr ll MOD = 1000000007;
constexpr bool debug = 0;
vector<int> cnt;
bool pairwise = true;
vector<int> sieve(int n) {
  vector<int> res;
  vector<bool> is_prime(n + 1, true);
  is_prime[0] = is_prime[1] = false;
  for (ll i = 2; i * i <= n; i++)
    if (is_prime[i]) {
      res.push_back(i);
      int sum = 0;
      for (ll j = 1; i * j <= n; j++) {
        is_prime[i * j] = false;
        sum += cnt[i * j];
      }
      if (sum > 1) pairwise = false;
    }
  for (int i = (0); i < (n + 1); ++i)
    if (is_prime[i]) res.push_back(i);
  sort(res.begin(), res.end());
  return res;
}
ll gcd(ll a, ll b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
int main() {
  int N;
  cin >> N;
  vector<int> A(N);
  for (int i = (0); i < (N); ++i) scanf("%d", &A[i]);
  constexpr int MAXA = 1000000;
  cnt.resize(MAXA + 1);
  for (int i = (0); i < (N); ++i) ++cnt[A[i]];
  sieve(MAXA);
  int g = A[0];
  for (int i = (1); i < (N); ++i) g = gcd(g, A[i]);
  if (pairwise)
    puts("pairwise coprime");
  else if (g == 1)
    puts("setwise coprime");
  else
    puts("not coprime");
  return 0;
}
