#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1000000007;
const long long INF = 1e12;
using Graph = vector<vector<long long>>;
long long gcd(long long a, long long b) {
  if (!a) return b;
  return gcd(b % a, a);
}
signed main() {
  long long N;
  cin >> N;
  vector<long long> A(N);
  for (long long i = 0; i < N; i++) cin >> A[i];
  vector<bool> IsPrime(100100, true);
  vector<long long> D(100100, 0);
  IsPrime.at(0) = false;
  IsPrime.at(1) = false;
  for (long long i = 2; i <= 100000; i++) {
    if (IsPrime.at(i) == true) {
      D[i] = i;
      for (long long j = 2; i * j <= 100000; j++) {
        IsPrime.at(i * j) = false;
        D[i * j] = i;
      }
    }
  }
  bool fg1 = 1;
  bool fg2 = 1;
  set<long long> fac;
  for (long long i = 0; i < N; i++) {
    long long B = A[i];
    while (D[B] != B) {
      if (fac.count(D[B])) fg1 = 0;
      fac.insert(D[B]);
      B /= D[B];
    }
    if (fg1 == 0) break;
  }
  long long G = gcd(A[0], A[1]);
  for (long long i = 2; i < N; i++) {
    G = gcd(G, A[i]);
  }
  if (G != 1) fg2 = 0;
  if (fg1)
    cout << "pairwise coprime" << endl;
  else if (fg2)
    cout << "setwise coprime" << endl;
  else
    cout << "not coprime" << endl;
}
