#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];
  bool fg1 = 1;
  bool fg2 = 1;
  if (N < 80000) {
    set<long long> num;
    for (long long i = 0; i < N; i++) {
      for (long long j = 2; j <= sqrt(A[i]); j++) {
        if (A[i] % j == 0) {
          if (num.count(j)) fg1 = 0;
          num.insert(j);
        }
      }
      if (num.count(A[i])) fg1 = 0;
      num.insert(A[i]);
    }
  } else {
    fg1 = 0;
  }
  long long T = gcd(A[0], A[1]);
  for (long long i = 2; i < N; i++) {
    if (gcd(T, A[i]) != 1) fg2 = 0;
  }
  if (fg1)
    cout << "pairwise coprime" << endl;
  else if (fg2)
    cout << "setwise coprime" << endl;
  else
    cout << "not coprime" << endl;
}
