#include <bits/stdc++.h>
using ll = long long;
constexpr ll mod = 1e9 + 7;
constexpr ll INF = 1LL << 60;
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;
}
ll gcd(ll n, ll m) {
  ll tmp;
  while (m != 0) {
    tmp = n % m;
    n = m;
    m = tmp;
  }
  return n;
}
ll lcm(ll n, ll m) { return abs(n) / gcd(n, m) * abs(m); }
using namespace std;
struct UF {
  vector<int> par;
  vector<int> Rank;
  vector<int> sz;
  UF(int n) { init(n); }
  void init(int n) {
    par.resize(n);
    Rank.resize(n);
    sz.resize(n);
    for (int i = 0; i < n; i++) {
      par[i] = i;
      Rank[i] = 0;
      sz[i] = 1;
    }
  }
  int find(int x) {
    if (par[x] == x) {
      return x;
    } else {
      return par[x] = find(par[x]);
    }
  }
  bool unite(int x, int y) {
    x = find(x);
    y = find(y);
    if (x == y) return false;
    if (Rank[x] < Rank[y]) {
      par[x] = y;
      sz[y] += sz[x];
    } else {
      par[y] = x;
      if (Rank[x] == Rank[y]) Rank[x]++;
      sz[x] += sz[y];
    }
    return true;
  }
  bool same(int x, int y) { return find(x) == find(y); }
  int size(int k) { return sz[find(k)]; }
};
void solve() {
  ll n;
  cin >> n;
  vector<ll> a(n);
  for (int i = (int)0; i < (int)n; ++i) cin >> a[i];
  vector<int> v(1e6 + 1);
  bool ng = false;
  for (int i = (int)0; i < (int)n; ++i) {
    v[a[i]]++;
    if (v[a[i]] >= 2) ng = true;
  }
  ll x = 0;
  for (int i = (int)0; i < (int)n; ++i) x = gcd(x, a[i]);
  if (x == 1) {
    for (int i = 2; i <= 1e6; ++i) {
      int c = 0;
      for (int j = i; j <= 1e6; j += i) {
        if (v[j] >= 1) ++c;
      }
      if (c > 1) {
        ng = true;
        break;
      }
    }
    if (ng)
      cout << "setwise coprime";
    else
      cout << "pairwise coprime";
  } else {
    cout << "not coprime";
  }
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout << fixed << setprecision(15);
  solve();
  return 0;
}
