#include <bits/stdc++.h>
using namespace std;
template <class T>
inline bool chmin(T& a, T b) {
  if (a > b) {
    a = b;
    return true;
  }
  return false;
}
template <class T>
inline bool chmax(T& a, T b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
}
long long gcd(long long a, long long b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
long long modinv(long long a, long long m) {
  long long b = m, u = 1, v = 0;
  while (b) {
    long long t = a / b;
    a -= t * b;
    swap(a, b);
    u -= t * v;
    swap(u, v);
  }
  u %= m;
  if (u < 0) u += m;
  return u;
}
vector<pair<long long, long long>> prim;
void pf(long long n) {
  long long s = sqrt(n);
  long long r = 0;
  for (long long i = 2; i <= s; i++) {
    if ((n % i) == 0) {
      r = 0;
      do {
        r++;
        n = n / i;
      } while ((n % i) == 0);
      prim.push_back({i, r});
    }
  }
  if (n > s) {
    prim.push_back({n, 1});
  }
}
long long firstp(long long n) {
  for (long long i = 2; i * i < n; i++) {
    if (n % i == 0) return i;
  }
  return n;
}
void solve() {
  long long N;
  cin >> N;
  vector<long long> a(N);
  for (long long i = 0; i < (N); i++) cin >> a[i];
  long long maxa = 0;
  for (long long i = 0; i < (N); i++) {
    maxa = max(maxa, a[i]);
  }
  vector<long long> D(maxa + 1);
  for (long long i = 1; i <= (maxa); i++) {
    D[i] = firstp(i);
  }
  vector<long long> pc(maxa + 1, 0);
  for (long long i = 0; i < (N); i++) {
    long long b = a[i];
    while (b > 1) {
      long long p1 = D[b];
      pc[p1]++;
      while (b % p1 == 0) b /= p1;
    }
  }
  long long pcmax = 0;
  for (long long i = 2; i <= maxa; i++) {
    pcmax = max(pcmax, pc[i]);
  }
  if (pcmax == 1)
    cout << "pairwise coprime\n";
  else if (pcmax < N)
    cout << "setwise coprime\n";
  else
    cout << "not coprime\n";
}
int main(void) { solve(); }
