#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) { return a % b == 0 ? b : gcd(b, a % b); }
long long lcm(long long a, long long b) { return (a / gcd(a, b)) * b; }
const int mod = 1000000007;
long long power(long long x, long long p) {
  long long a = 1;
  while (p > 0) {
    if (p % 2 == 0) {
      x *= x;
      p /= 2;
    } else {
      a *= x;
      p--;
    }
  }
  return a;
}
long long mpower(long long x, long long p) {
  long long a = 1;
  while (p > 0) {
    if (p % 2 == 0) {
      x = x * x % mod;
      p /= 2;
    } else {
      a = a * x % mod;
      p--;
    }
  }
  return a;
}
long long co(long long n, long long k) {
  long long a = 1;
  for (auto i = 1ll; i < k; i++) {
    a *= n - i + 1;
    a /= i;
  }
  return a;
}
long long mc(long long n, long long m) {
  long long k = 1, l = 1;
  for (auto i = n - m + 1; i < n + 1; i++) k = k * i % mod;
  for (auto i = 1; i < m + 1; i++) l = l * i % mod;
  l = mpower(l, mod - 2);
  return k * l % mod;
}
template <typename T>
vector<T> smallest_prime_factors(T n) {
  vector<T> spf(n + 1);
  for (int i = 0; i <= n; i++) spf[i] = i;
  for (T i = 2; i * i <= n; i++) {
    if (spf[i] == i) {
      for (T j = i * i; j <= n; j += i) {
        if (spf[j] == j) {
          spf[j] = i;
        }
      }
    }
  }
  return spf;
}
int main(void) {
  int n;
  cin >> n;
  vector<int> a(n);
  map<int, int> mp;
  for (auto i = 0; i < n; i++) cin >> a[i];
  int g = a[0];
  for (auto i = 1; i < n; i++) {
    g = gcd(g, a[i]);
  }
  auto spf = smallest_prime_factors(1000000);
  bool pa = true;
  for (auto i = 0; i < n; i++) {
    if (a[i] == 1) continue;
    int v = spf[a[i]];
    while (a[i] % v == 0) {
      if (mp[v]) pa = false;
      mp[v]++;
      if (mp[a[i]]) pa = false;
      mp[a[i]]++;
      a[i] /= v;
    }
  }
  if (pa)
    puts("pairwise coprime");
  else if (g == 1)
    puts("setwise coprime");
  else
    puts("not coprime");
  return 0;
}
