#include <bits/stdc++.h>
#pragma GCC optimize(2)
using namespace std;
const double eps = 1e-8;
const long long inf = 0x3f3f3f3f;
const long long INF = 0x3f3f3f3f3f3f3f3f;
const double pi = acos(-1.0);
long long tt;
inline long long rd() {
  long long x = 0, f = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    x = x * 10 + ch - '0';
    ch = getchar();
  }
  return x * f;
}
void out(long long a) {
  if (a < 0) putchar('-'), a = -a;
  if (a >= 10) out(a / 10);
  putchar(a % 10 + '0');
}
long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }
const long long maxn = 1e6 + 500;
long long a[maxn];
long long nums[maxn];
long long prime[maxn];
long long vis[maxn];
long long cnt;
void is_prime() {
  for (long long i = 2; i < maxn; i++) {
    if (!vis[i]) prime[cnt++] = i;
    for (long long j = 0; j < cnt && i * prime[j] < maxn; j++) {
      vis[i * prime[j]] = 1;
      if (i % prime[j] == 0) break;
    }
  }
}
long long get_num(long long x) {
  long long res = 1;
  for (long long i = 0; i < cnt && prime[i] * prime[i] <= x; i++) {
    if (x % prime[i] == 0) {
      nums[prime[i]]++;
      long long num = 0;
      while (x % prime[i] == 0) {
        num++;
        x /= prime[i];
      }
      res *= (1 + num);
    }
  }
  if (x > 1) res *= 2ll;
  return res;
}
void solve() {
  is_prime();
  long long n = rd();
  for (long long i = 1; i <= n; i++) a[i] = rd(), get_num(a[i]);
  long long flag = 1;
  for (long long i = 0; i <= cnt; i++)
    if (nums[prime[i]] > 1) flag = 0;
  if (flag)
    puts("pairwise coprime");
  else {
    long long res = a[1];
    for (long long i = 2; i <= n; i++) res = gcd(res, a[i]);
    puts(res == 1 ? "setwise coprime" : "not coprime");
  }
}
signed main() {
  solve();
  return 0;
}
