#include <bits/stdc++.h>
#pragma GCC optimize(3, "Ofast")
using namespace std;
inline int read() {
  int s = 0, w = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') w = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') s = s * 10 + ch - '0', ch = getchar();
  return s * w;
}
const int inf = 2e9 + 7;
double eps = 1e-6;
const int mod = 1e9 + 7;
const int N = 1e6 + 10;
const double pi = acos(-1.0);
long long power(long long a, long long b) {
  long long res = 1;
  while (b) {
    if (b & 1) res = res * a % mod;
    a = a * a % mod;
    b >>= 1;
  }
  return res;
}
long long gcd(long long a, long long b) { return !b ? a : gcd(b, a % b); }
void add(long long& a, long long b) {
  a += b;
  ((a >= mod) && (a -= mod));
  ((a < 0) && (a += mod));
}
int a[N];
int vis[N];
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n;
  cin >> n;
  for (int i = 1; i <= n; ++i) cin >> a[i];
  bool ok = 1;
  for (int i = 1; i <= n; ++i) {
    int up = sqrt(a[i]);
    for (int j = 2; j <= up; ++j)
      if (a[i] % j == 0) {
        if (vis[j]) {
          ok = 0;
          break;
        }
        if (j * j != a[i])
          if (vis[a[i] / j]) {
            ok = 0;
            break;
          }
        vis[a[i] / j] = 1;
        vis[j] = 1;
      }
    if (vis[a[i]]) {
      ok = 0;
    }
    vis[a[i]] = 1;
    if (!ok) break;
  }
  if (ok) {
    cout << "pairwise coprime";
  } else {
    int now = a[1];
    for (int i = 2; i <= n; ++i) {
      now = gcd(now, a[i]);
      if (now == 1) break;
    }
    if (now == 1) {
      cout << "setwise coprime";
    } else
      cout << "not coprime";
  }
}
