#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pi = pair<int, int>;
using pl = pair<ll, ll>;
using vi = vector<int>;
using vl = vector<ll>;
using vs = vector<string>;
using vb = vector<bool>;
using vvi = vector<vi>;
using vvl = vector<vl>;
const int MOD = 1e9 + 7;
const int INF = 1e9 + 7;
const ll INFL = 1e18;
const double PI = 3.141592653589793;
const double EPS = 1e-9;
template <class T>
bool chmax(T &a, const T &b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
}
template <class T>
bool chmin(T &a, const T &b) {
  if (a > b) {
    a = b;
    return true;
  }
  return false;
}
int gcd(int a, int b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
signed main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  cout << fixed << setprecision(20);
  vb isPrime(1000010, true);
  isPrime[0] = isPrime[1] = false;
  for (int i = 2; i * i <= 1000010; i++) {
    if (isPrime[i]) {
      for (int j = 2 * i; j < 1000010; j += i) isPrime[j] = false;
    }
  }
  vi prime;
  for (int i = 0; i < ((int)isPrime.size()); i++)
    if (isPrime[i]) prime.push_back(i);
  int N;
  cin >> N;
  vi A(N);
  for (int i = 0; i < (N); i++) cin >> A[i];
  vi B(A);
  bool pairwise = true;
  vb used((int)prime.size(), false);
  for (int i = 0; i < (N); i++) {
    for (int j = 0; j < ((int)prime.size()); j++) {
      bool tmp = false;
      while (A[i] % prime[j] == 0) {
        A[i] /= prime[j];
        tmp = true;
      }
      if (tmp && used[j])
        pairwise = false;
      else if (tmp)
        used[j] = true;
      if (A[i] == 1) break;
    }
  }
  if (pairwise) {
    cout << "pairwise coprime" << endl;
    return 0;
  }
  int x = B[0];
  for (int i = 0; i < (N - 1); i++) x = gcd(x, B[i + 1]);
  if (x == 1)
    cout << "setwise coprime" << endl;
  else
    cout << "not coprime" << endl;
}
