#include <bits/stdc++.h>
using namespace std;
template <class T>
void _E(T x) {
  cerr << x;
}
void _E(double x) { cerr << fixed << setprecision(6) << x; }
void _E(string s) { cerr << "\"" << s << "\""; }
template <class A, class B>
void _E(pair<A, B> x) {
  cerr << '(';
  _E(x.first);
  cerr << ", ";
  _E(x.second);
  cerr << ")";
}
template <class T>
void _E(vector<T> x) {
  cerr << "[";
  for (auto it = x.begin(); it != x.end(); ++it) {
    if (it != x.begin()) cerr << ", ";
    _E(*it);
  }
  cerr << "]";
}
void ERR() {}
template <class A, class... B>
void ERR(A x, B... y) {
  _E(x);
  cerr << (sizeof...(y) ? ", " : " ");
  ERR(y...);
}
const long long mod = 1e9 + 7;
const long long maxn = 2e6 + 10;
const long double pi = acos(-1.0);
long long qpow(long long a, long long b) {
  long long ret = 1;
  for (; b; a = a * a % mod, b >>= 1) {
    if (b & 1) {
      ret = ret * a % mod;
    }
  }
  return ret;
}
vector<long long> f(maxn), invf(maxn);
long long inv(long long a) { return qpow(a, mod - 2); }
void prework() {
  f[0] = 1;
  for (long long i = (1); i <= (maxn - 1); ++i) {
    f[i] = f[i - 1] * i % mod;
  }
  invf[maxn - 1] = qpow(f[maxn - 1], mod - 2);
  for (long long i = maxn - 2; i >= 0; i--) {
    invf[i] = invf[i + 1] * (i + 1) % mod;
  }
}
long long C(long long n, long long m) {
  if (n > m || m < 0) return 0;
  if (n == 0 || m == n) return 1;
  long long res = (f[m] * invf[m - n] % mod * invf[n]) % mod;
  return res;
}
int v[maxn], prime[maxn];
int m = 0;
void sieve(int N) {
  memset(v, 0, sizeof(v));
  for (long long i = (2); i <= (N); ++i) {
    if (v[i] == 0) {
      v[i] = i;
      prime[++m] = i;
    }
    for (long long j = (1); j <= (m); ++j) {
      if (prime[j] > v[i] || prime[j] > N / i) break;
      v[i * prime[j]] = prime[j];
    }
  }
}
vector<long long> a;
map<int, int> cc;
signed main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n;
  cin >> n;
  sieve(1e3 + 100);
  a.resize(n + 1);
  int ones = 0;
  bool pc = 1, allh = 0;
  for (long long i = (1); i <= (n); ++i) {
    cin >> a[i];
    if (a[i] != 1) {
      long long tmp = a[i];
      for (long long j = (1); j <= (m); ++j) {
        bool derived = 0;
        while (tmp % prime[j] == 0) {
          tmp /= prime[j];
          derived = 1;
        }
        if (derived) {
          cc[prime[j]]++;
        }
      }
      if (tmp > 1) {
        cc[tmp]++;
      }
    } else
      ones++;
  }
  n -= ones;
  pc = (cc.size() >= n ? 1 : 0);
  for (auto i : cc) {
    if (i.second > 1) {
      pc = 0;
    }
    if (i.second == n) {
      allh = 1;
    }
  }
  if (pc)
    cout << "pairwise coprime"
         << "\n";
  else if (allh)
    cout << "not coprime"
         << "\n";
  else
    cout << "setwise coprime"
         << "\n";
}
