#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
using P = pair<int, int>;
using PL = pair<long long, long long>;
using Pxy = pair<double, double>;
using T = tuple<int, int, bool>;
const int INF = 1001001007;
const int mod = 1000000007;
const int MOD = 998244353;
const ll inf = 1e18;
template <typename AT>
void printvec(vector<AT> &ar) {
  for (int i = 0; i < (ar.size() - 1); ++i) cout << ar[i] << " ";
  cout << ar[ar.size() - 1] << endl;
}
template <typename Q>
void printvvec(vector<vector<Q>> &ar) {
  for (int i = 0; i < (ar.size()); ++i) {
    for (int j = 0; j < (ar[0].size() - 1); ++j) cout << ar[i][j] << " ";
    cout << ar[i][ar[0].size() - 1] << endl;
  }
}
template <typename S>
bool range(S a, S b, S x) {
  return (a <= x && x < b);
}
void yes() { cout << "Yes" << endl; }
void no() { cout << "No" << endl; }
ll cel(ll a, ll b) {
  if (a % b == 0)
    return a / b;
  else
    return a / b + 1;
}
ll gcds(ll a, ll b) {
  ll c = a % b;
  while (c != 0) {
    a = b;
    b = c;
    c = a % b;
  }
  return b;
}
int main() {
  int n;
  cin >> n;
  vector<int> so(100010, 1);
  so[0] = 0;
  so[1] = 0;
  for (int i = 2; i < (100010); ++i) {
    if (so[i] == 0)
      continue;
    else {
      int cnt = i + i;
      while (cnt <= 100000) {
        so[cnt] = 0;
        cnt += i;
      }
    }
  }
  vector<P> ar;
  for (int i = 0; i < (100001); ++i)
    if (so[i] == 1) ar.emplace_back(P(i, 0));
  int m = ar.size();
  map<int, int> mp;
  for (int i = 0; i < (m); ++i) mp[ar[i].first] = i;
  vector<int> al(n);
  for (int i = 0; i < (n); ++i) cin >> al[i];
  bool t = true;
  for (int i = 0; i < (n); ++i) {
    int d = al[i];
    int cn = 0;
    while (cn < m && ar[cn].first * ar[cn].first > al[i]) {
      int kc = 0;
      while (d % ar[cn].first == 0) {
        d /= ar[cn].first;
        kc++;
      }
      if (kc >= 1) ar[cn].second++;
      cn++;
    }
    if (d != 1) ar[mp[d]].second++;
  }
  for (int i = 0; i < (m); ++i) {
    if (ar[i].second >= 2) {
      t = false;
      break;
    }
  }
  if (t)
    cout << "pairwise coprime" << endl;
  else {
    int ans = al[0];
    for (int i = 0; i < (n); ++i) {
      ans = gcds(ans, al[i]);
    }
    if (ans == 1)
      cout << "setwise coprime" << endl;
    else
      cout << "not coprime" << endl;
  }
}
