#include <bits/stdc++.h>
constexpr auto mod = 1000000007;
using namespace std;
template <class T>
inline void chmax(T& a, T b) {
  a = std::max(a, b);
}
template <class T>
inline void chmin(T& a, T b) {
  a = std::min(a, b);
}
const long long MAX = 2330000;
long long fac[MAX], finv[MAX], inv[MAX];
void COMinit() {
  fac[0] = fac[1] = 1;
  finv[0] = finv[1] = 1;
  inv[1] = 1;
  for (long long i = 2; i < MAX; i++) {
    fac[i] = fac[i - 1] * i % mod;
    inv[i] = mod - inv[mod % i] * (mod / i) % mod;
    finv[i] = finv[i - 1] * inv[i] % mod;
  }
}
long long COMB(long long n, long long k) {
  if (n < k) return 0;
  if (n < 0 || k < 0) return 0;
  return fac[n] * (finv[k] * finv[n - k] % mod) % mod;
}
bool prime(long long n) {
  long long cnt = 0;
  for (long long i = 1; i <= sqrt(n); i++) {
    if (n % i == 0) cnt++;
  }
  if (cnt != 1)
    return false;
  else
    return n != 1;
}
long long gcd(long long x, long long y) {
  if (y == 0) return x;
  return gcd(y, x % y);
}
long long lcm(long long x, long long y) { return x / gcd(x, y) * y; }
long long mod_pow(long long x, long long y, long long m) {
  long long res = 1;
  while (y) {
    if (y & 1) {
      res = res * x % m;
    }
    x = x * x % m;
    y >>= 1;
  }
  return res;
}
long long kai(long long x, long long y) {
  long long res = 1;
  for (long long i = x - y + 1; i <= x; i++) {
    res *= (i % mod);
    res %= mod;
  }
  return res;
}
long long comb(long long x, long long y) {
  if (y > x) return 0;
  return kai(x, y) * mod_pow(kai(y, y), mod - 2, mod) % mod;
}
class UnionFind {
 protected:
  long long *par, *rank, *size;

 public:
  UnionFind(unsigned long long size) {
    par = new long long[size];
    rank = new long long[size];
    this->size = new long long[size];
    for (long long i = 0; i < size; i++) {
      par[i] = i;
      rank[i] = 0;
      this->size[i] = 1;
    }
  }
  long long find(long long n) {
    if (par[n] == n) return n;
    return par[n] = find(par[n]);
  }
  void unite(long long n, long long m) {
    n = find(n);
    m = find(m);
    if (n == m) return;
    if (rank[n] < rank[m]) {
      par[n] = m;
      size[m] += size[n];
    } else {
      par[m] = n;
      size[n] += size[m];
      if (rank[n] == rank[m]) rank[n]++;
    }
  }
  bool same(long long n, long long m) { return find(n) == find(m); }
  long long getsize(long long n) { return size[find(n)]; }
};
long long dight(long long n) {
  long long ans = 1;
  while (n >= 10) {
    n /= 10;
    ans++;
  }
  return ans;
}
long long dight_sum(long long n) {
  long long sum = 0;
  for (long long i = 0; i < 20; i++)
    sum += (n % (long long)pow(10, i + 1)) / (pow(10, i));
  return sum;
}
long long dight_min(long long n) {
  long long ans = 9;
  while (n >= 10) {
    ans = min(ans, n % 10);
    n /= 10;
  }
  ans = min(ans, n);
  return ans;
}
long long dight_max(long long n) {
  long long ans = 0;
  while (n >= 10) {
    ans = max(ans, n % 10);
    n /= 10;
  }
  ans = max(ans, n);
  return ans;
}
long long modinv(long long a, long long m) {
  long long b = m, u = 1, v = 0;
  while (b) {
    long long t = a / b;
    a -= t * b;
    swap(a, b);
    u -= t * v;
    swap(u, v);
  }
  u %= m;
  if (u < 0) u += m;
  return u;
}
long long n;
long long a[1111111];
long long cont[999999];
bool z;
signed main() {
  cin >> n;
  for (long long i = 0; i < n; i++) cin >> a[i];
  long long p = gcd(a[0], a[1]);
  for (long long i = 2; i < n; i++) p = gcd(p, a[i]);
  if (p == 1)
    z = true;
  else
    z = false;
  for (long long i = 0; i < n; i++) {
    long long s = a[i];
    for (long long j = 2; j <= sqrt(s); j++) {
      while (a[i] % j == 0) {
        a[i] /= j;
        if (cont[j] >= 1) {
          if (z == true) {
            puts("setwise coprime");
            getchar();
            getchar();
            return 0;
          } else {
            puts("not coprime");
            getchar();
            getchar();
            return 0;
          }
        }
        if (a[i] % j != 0) cont[j]++;
      }
    }
    if (a[i] != 1) cont[a[i]]++;
  }
  puts("pairwise coprime");
  getchar();
  getchar();
  return 0;
}
