#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<ll, ll>;
string char_to_string(char val) { return string(1, val); }
int char_to_int(char val) { return val - '0'; }
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;
}
struct edge {
  ll to, cost;
};
struct UnionFind {
  vector<int> par;
  UnionFind(int n) : par(n, -1) {}
  int root(int x) {
    if (par[x] < 0)
      return x;
    else
      return par[x] = root(par[x]);
  }
  bool issame(int x, int y) { return root(x) == root(y); }
  bool merge(int x, int y) {
    x = root(x);
    y = root(y);
    if (x == y) return false;
    if (par[x] > par[y]) swap(x, y);
    par[x] += par[y];
    par[y] = x;
    return true;
  }
  int size(int x) { return -par[root(x)]; }
};
int gcd(int a, int b) {
  if (a % b == 0) {
    return (b);
  } else {
    return (gcd(b, a % b));
  }
}
vector<ll> divisor(ll n) {
  vector<ll> ret;
  for (ll i = 1; i * i <= n; i++) {
    if (n % i == 0) {
      ret.push_back(i);
      if (i * i != n) ret.push_back(n / i);
    }
  }
  sort(begin(ret), end(ret));
  return (ret);
}
int main() {
  ll N;
  cin >> N;
  vector<ll> A(N);
  for (int i = 0, i_len = (N); i < i_len; ++i) cin >> A[i];
  sort((A).begin(), (A).end());
  ll res = gcd(A[0], A[1]);
  for (int i = 2; i < N; ++i) {
    res = gcd(res, A[i]);
  }
  if (res != 1) {
    cout << "not coprime" << endl;
    return 0;
  } else {
    vector<ll> tmp(*max_element((A).begin(), (A).end()), 0);
    for (int i = 0, i_len = (N); i < i_len; ++i) {
      for (ll k = 1; k * k <= A[i]; k++) {
        if (A[i] % k == 0) {
          if (tmp[k] >= 1 && k != 1) {
            cout << "setwise coprime" << endl;
            return 0;
          }
          tmp[k]++;
          if (k * k != A[i]) tmp[A[i] / k]++;
        }
      }
      tmp[A[i]]++;
    }
    cout << "pairwise coprime" << endl;
  }
}
