#include <bits/stdc++.h>
using namespace std;
using vi = vector<long long>;
using vvi = vector<vi>;
using vvvi = vector<vvi>;
using vvvvi = vector<vvvi>;
using vp = vector<pair<long long, long long> >;
using vvp = vector<vp>;
using vb = vector<bool>;
using vvb = vector<vb>;
const long long inf = 1001001001001001001;
const long long INF = 1001001001;
const long long mod = 1000000007;
const double eps = 1e-10;
template <class T>
bool chmin(T& a, T b) {
  if (a > b) {
    a = b;
    return true;
  }
  return false;
}
template <class T>
bool chmax(T& a, T b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
}
template <class T>
void out(T a) {
  cout << a << '\n';
}
template <class T>
void outp(T a) {
  cout << '(' << a.first << ',' << a.second << ')' << '\n';
}
template <class T>
void outvp(T v) {
  for (long long i = 0; i < (long long)(v.size()); i++)
    cout << '(' << v[i].first << ',' << v[i].second << ')';
  cout << '\n';
}
template <class T>
void outvvp(T v) {
  for (long long i = 0; i < (long long)(v.size()); i++) outvp(v[i]);
}
template <class T>
void outv(T v) {
  for (long long i = 0; i < (long long)(v.size()); i++) {
    if (i) cout << ' ';
    cout << v[i];
  }
  cout << '\n';
}
template <class T>
void outvv(T v) {
  for (long long i = 0; i < (long long)(v.size()); i++) outv(v[i]);
}
template <class T>
bool isin(T x, T l, T r) {
  return (l) <= (x) && (x) <= (r);
}
template <class T>
void yesno(T b) {
  if (b)
    out("yes");
  else
    out("no");
}
template <class T>
void YesNo(T b) {
  if (b)
    out("Yes");
  else
    out("No");
}
template <class T>
void YESNO(T b) {
  if (b)
    out("YES");
  else
    out("NO");
}
template <class T>
void noyes(T b) {
  if (b)
    out("no");
  else
    out("yes");
}
template <class T>
void NoYes(T b) {
  if (b)
    out("No");
  else
    out("Yes");
}
template <class T>
void NOYES(T b) {
  if (b)
    out("NO");
  else
    out("YES");
}
void outs(long long a, long long b) {
  if (a >= inf - 100)
    out(b);
  else
    out(a);
}
long long gcd(long long a, long long b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
long long modpow(long long a, long long b) {
  long long res = 1;
  a %= mod;
  while (b) {
    if (b & 1) res = res * a % mod;
    a = a * a % mod;
    b >>= 1;
  }
  return res;
}
long long MX = 1005;
vi sosuu(long long n) {
  vector<bool> b(n - 1, true);
  for (long long i = 2; i <= sqrt(n); i++) {
    if (!b[i - 2]) continue;
    for (long long j = 2; i * j <= n; j++) b[i * j - 2] = false;
  }
  vi res;
  for (long long i = 0; i < (long long)(n - 1); i++)
    if (b[i]) res.emplace_back(i + 2);
  return res;
}
bool is_prime(long long n) {
  if (n <= 1) return false;
  for (long long i = 2; i < (long long)(sqrt(n) + 1); i++)
    if (n % i == 0) return false;
  return true;
}
vp bunkai(long long n) {
  vp res;
  if (n <= 1) return res;
  vi x = sosuu(sqrt(n) + 1);
  for (long long i : x) {
    if (n % i != 0) continue;
    long long k = 0;
    while (n % i == 0) {
      k++;
      n /= i;
    }
    res.emplace_back(i, k);
  }
  if (n != 1) res.emplace_back(n, 1);
  return res;
}
int main() {
  long long n;
  cin >> n;
  vi s = sosuu(MX);
  long long t = s.size();
  vi cnt(1000005);
  vi v(n);
  for (long long i = 0; i < (long long)(n); i++) cin >> v[i];
  bool p = true;
  for (long long i = 0; i < (long long)(n); i++) {
    for (long long j = 0; j < (long long)(t); j++)
      if (v[i] % s[j] == 0) cnt[s[j]]++;
    if (v[i] > s.back()) cnt[v[i]]++;
  }
  for (long long x : cnt)
    if (x > 1) p = false;
  if (p) {
    out("pairwise coprime");
    return 0;
  };
  long long g = v[0];
  for (long long i = 0; i < (long long)(n); i++) g = gcd(v[i], g);
  if (g == 1)
    out("setwise coprime");
  else
    out("not coprime");
}
