#include <bits/stdc++.h>
using namespace std;
const long long int mxn = 1e5;
const long long int INF = (long long int)2e18;
const long long int MOD = 1000000007;
const long long int PEG = 998244353;
long double pie = acos(-1);
template <typename Arg1>
void __f(const char *name, Arg1 &&arg1);
template <typename Arg1, typename... Args>
void __f(const char *names, Arg1 &&arg1, Args &&...args);
long long ll binpow(long long ll x, long long ll y, long long ll p);
long long ll nCr(long long ll n, long long ll r, long long ll p);
long long ll gcd(long long ll a, long long ll b);
long long ll ceil(long long ll a, long long ll b);
bool comp(pair<long long int, long long int> a,
          pair<long long int, long long int> b) {
  return a.first < b.first;
}
long long int spf[1000001];
void sieve() {
  spf[1] = 1;
  for (long long int i = 2; i < 1000001; i++) spf[i] = i;
  for (long long int i = 4; i < 1000001; i += 2) spf[i] = 2;
  for (long long int i = 3; i * i < 1000001; i++) {
    if (spf[i] == i) {
      for (long long int j = i * i; j < 1000001; j += i)
        if (spf[j] == j) spf[j] = i;
    }
  }
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  sieve();
  long long int n;
  cin >> n;
  bool ok = true;
  long long int a[n];
  for (long long ll i = 0; i <= n - 1; i++) cin >> a[i];
  sort(a, a + n);
  long long int gg = gcd(a[0], a[1]);
  for (long long ll i = 1; i <= n - 1; i++) {
    gg = gcd(a[i], gg);
    if (a[i] == a[i - 1]) {
      ok = false;
    }
  }
  if (gg != 1) {
    cout << "not coprime";
    return 0;
  }
  set<long long int> s1;
  for (long long ll i = 0; i <= n - 1; i++) {
    set<long long int> s2;
    long long int x = a[i];
    while (x != 1) {
      s2.insert(spf[x]);
      x = x / spf[x];
    }
    for (long long int x : s2) {
      if (s1.find(x) != s1.end()) {
        cout << "setwise coprime";
        return 0;
      }
      s1.insert(x);
    }
  }
  cout << "pairwise coprime";
  return 0;
}
long long ll binpow(long long ll x, long long ll y, long long ll p) {
  long long ll res = 1;
  x = x % p;
  while (y > 0) {
    if (y & 1) res = (res * x) % p;
    y = y >> 1;
    x = (x * x) % p;
  }
  return res;
}
long long ll gcd(long long ll a, long long ll b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
long long ll ceil(long long ll a, long long ll b) { return (a + b - 1) / b; }
long long ll nCr(long long ll n, long long ll r, long long ll p) {
  if (r > n - r) {
    r = n - r;
  }
  if (r == 0) {
    return 1;
  }
  long long ll num2 = 1, num1 = 1, ans = 1;
  for (long long int i = 1; i <= r; i++) {
    num1 *= (n + 1 - i) % p;
    num1 %= p;
    num2 *= i % p;
    num2 %= p;
  }
  ans *= num1;
  ans %= p;
  ans *= binpow(num2, p - 2, p);
  ans %= p;
  return ans;
}
template <typename Arg1>
void __f(const char *name, Arg1 &&arg1) {
  std::cout << name << " : " << arg1 << endl;
}
template <typename Arg1, typename... Args>
void __f(const char *names, Arg1 &&arg1, Args &&...args) {
  const char *comma = strchr(names + 1, ',');
  std::cout.write(names, comma - names) << " : " << arg1 << "\n";
  __f(comma + 1, args...);
}
