#include <bits/stdc++.h>
using namespace std;
template <typename T>
ostream &operator<<(ostream &os, const vector<T> &A) {
  for (long long i = 0; i < A.size(); i++) os << A[i] << " ";
  os << endl;
  return os;
}
template <>
ostream &operator<<(ostream &os, const vector<vector<long long> > &A) {
  long long N = A.size();
  for (long long i = 0; i < N; i++) {
    for (long long j = 0; j < A[i].size(); j++) os << A[i][j] << " ";
    os << endl;
  }
  return os;
}
struct edge {
  long long from, to, d, c;
  edge(long long _from = 0, long long _to = 0, long long _d = 0,
       long long _c = 0) {
    from = _from;
    to = _to;
    d = _d;
    c = _c;
  }
  bool operator<(const edge &rhs) const {
    return (d == rhs.d) ? (c < rhs.c) : (d < rhs.d);
  }
};
struct aabb {
  long long x1, y1, x2, y2;
  aabb(long long x1, long long y1, long long x2, long long y2)
      : x1(x1), y1(y1), x2(x2), y2(y2) {}
};
struct flow {
  long long to, cap, rev, cost;
  flow(long long to = 0, long long cap = 0, long long rev = 0,
       long long cost = 0)
      : to(to), cap(cap), rev(rev), cost(cost) {}
};
const long long di[4] = {0, -1, 0, 1};
const long long dj[4] = {-1, 0, 1, 0};
const long long ci[5] = {0, 0, -1, 0, 1};
const long long cj[5] = {0, -1, 0, 1, 0};
const long long LINF = LLONG_MAX / 2;
const long long INF = INT_MAX / 2;
const long double PI = acos(-1);
long long pow2(long long n) { return 1LL << n; }
template <typename T, typename U>
bool chmin(T &x, const U &y) {
  if (x > y) {
    x = y;
    return true;
  }
  return false;
}
template <typename T, typename U>
bool chmax(T &x, const U &y) {
  if (x < y) {
    x = y;
    return true;
  }
  return false;
}
template <typename A, size_t N, typename T>
void Fill(A (&array)[N], const T &val) {
  fill((T *)array, (T *)(array + N), val);
}
struct initializer {
  initializer() { cout << fixed << setprecision(20); }
};
initializer _____;
long long gcd(long long a, long long b) {
  if (b == 0)
    return a;
  else
    return gcd(b, a % b);
}
long long extgcd(long long a, long long b, long long &x, long long &y) {
  long long d = a;
  if (b != 0) {
    d = extgcd(b, a % b, y, x);
    y -= (a / b) * x;
  } else {
    x = 1;
    y = 0;
  }
  return d;
}
long long factorial(long long x) {
  if (x == 1)
    return 1;
  else
    return x * factorial(x - 1);
}
long long Mfactorial(long long x, long long m) {
  long long ret = 1;
  for (long long i = 1; i <= x; i++) {
    ret *= i;
    ret %= m;
  }
  return ret;
}
vector<long long> MfactTable(long long n, long long m) {
  vector<long long> ret(n + 1);
  ret[0] = 1;
  long long tmp = 1;
  for (long long i = 1; i <= n; i++) {
    tmp *= i;
    tmp %= m;
    ret[i] = tmp;
  }
  return ret;
}
long long Minverse(long long a, long long m) {
  long long x, y;
  extgcd(a, m, x, y);
  return (m + x % m) % m;
}
long long McombSmall(long long n, long long k, long long m) {
  if (k > n) return 0;
  long long ret = Mfactorial(n, m);
  ret *= Minverse(Mfactorial(k, m), m);
  ret %= m;
  ret *= Minverse(Mfactorial(n - k, m), m);
  return ret % m;
}
long long McombFromFactTable(vector<long long> &T, long long n, long long k,
                             long long m) {
  if (k > n) return 0;
  long long ret = T[n];
  ret *= Minverse(T[k], m);
  ret %= m;
  ret *= Minverse(T[n - k], m);
  return ret % m;
}
long long pow(long long x, long long n) {
  if (n == 0) return 1;
  long long ret = (n & 1) ? x : 1;
  long long a = pow(x, n / 2);
  return ret * a * a;
}
long long Mpow(long long x, long long n, long long m) {
  if (n == 0) return 1;
  long long ret = (n & 1) ? x : 1;
  long long a = Mpow(x, n / 2, m);
  return (((ret * a) % m) * a) % m;
}
vector<vector<long long> > combTable(long long N) {
  vector<vector<long long> > ret(N + 1, vector<long long>(N + 1));
  for (long long i = 0; i <= N; i++)
    for (long long j = 0; j <= i; j++) {
      if (j == 0 || j == i)
        ret[i][j] = 1;
      else
        ret[i][j] = ret[i - 1][j - 1] + ret[i - 1][j];
    }
  return ret;
}
long long countNmodPisQlr(long long l, long long r, long long P, long long Q) {
  return (r - Q + P) / P - (l - Q + P - 1) / P;
}
struct Combination {
  long long N = 0, M;
  vector<long long> Ftable, FItable, Inversetable;
  void init() {
    Ftable.resize(N + 1);
    FItable.resize(N + 1);
    Inversetable.resize(N + 1);
    Ftable[0] = 1;
    FItable[0] = 1;
    for (long long i = 1; i <= N; i++) Ftable[i] = Ftable[i - 1] * i % M;
    FItable[N] = Minverse(Ftable[N], M);
    for (long long i = N - 1; i >= 1; i--)
      FItable[i] = FItable[i + 1] * (i + 1) % M;
    Inversetable[1] = 1;
    for (long long i = 2; i <= N; i++)
      Inversetable[i] = M - Inversetable[M % i] * (M / i) % M;
  }
  Combination(long long max, long long mod) {
    N = max;
    M = mod;
    init();
  }
  long long calc(long long n, long long k) {
    if (k > n) return 0;
    long long ret = Ftable[n] * FItable[k] % M * FItable[n - k] % M;
    return ret;
  }
  long long inverse(long long n) { return Inversetable[n]; }
  long long factorial(long long n) { return Ftable[n]; }
  long long factorialInverse(long long n) { return FItable[n]; }
  long long permutation(long long n, long long k) {
    if (k > n) return 0;
    return Ftable[n] * FItable[n - k] % M;
  }
};
long long N, M, K, T, Q, H, W;
signed main() {
  cin >> N;
  vector<long long> A(N);
  for (long long i = 0; i < (long long)(N); i++) cin >> A[i];
  vector<bool> p(1e6 + 10, true);
  p[0] = false;
  p[1] = false;
  for (long long i = 2; i < p.size(); i++)
    if (p[i])
      for (long long j = i + i; j < p.size(); j += i) p[j] = false;
  vector<long long> prime;
  for (long long i = 0; i < (long long)(p.size()); i++)
    if (p[i] == true) prime.push_back(i);
  set<long long> s;
  long long f = 1;
  for (long long i = 0; i < (long long)(N); i++) {
    for (long long j = 0; prime[j] * prime[j] <= A[i]; j++) {
      if (A[i] % prime[j] == 0) {
        if (s.count(prime[j])) {
          f = 0;
          break;
        } else
          s.insert(prime[j]);
      }
    }
    if (!f) break;
  }
  if (f) {
    cout << "pairwise coprime" << endl;
    return 0;
  }
  long long g = 0;
  for (long long i = 0; i < (long long)(N); i++) g = gcd(A[i], g);
  if (g == 1) {
    cout << "setwise coprime" << endl;
  } else {
    cout << "not coprime" << endl;
  }
  return 0;
}
