#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
using vl = vector<ll>;
using vll = vector<vl>;
using Pll = pair<ll, ll>;
const int MOD = 1e9 + 7;
const ll INF = 2e15;
template <class T>
void print(const T& t) {
  cout << t << endl;
}
template <class T>
inline bool chmax(T& a, T b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T>
inline bool chmin(T& a, T b) {
  if (a > b) {
    a = b;
    return 1;
  }
  return 0;
}
ll gcd(ll a, ll b) { return b ? gcd(b, a % b) : a; }
int main() {
  vector<bool> z(1000007, false);
  ll n;
  cin >> n;
  bool pairwize = true;
  vl a(n);
  for (ll i = 0; i < (ll)(n); i++) {
    cin >> a[i];
    for (ll j = 2; j <= sqrt(a[i]); j++) {
      if (a[i] % j == 0) {
        if (!z[j]) {
          z[j] = true;
        } else {
          pairwize = false;
          i = INF;
          break;
        }
      }
    }
    if (!z[a[i]]) {
      z[a[i]] = true;
    } else {
      pairwize = false;
      break;
    }
  }
  if (pairwize) {
    print("pairwise coprime");
    return 0;
  } else {
    for (ll i = 1; i < n; i++) {
      a[i] = gcd(a[i], a[i - 1]);
      if (a[i] == 1) {
        break;
      }
    }
    if (a[n - 1] == 1) {
      print("setwise coprime");
    } else {
      print("not coprime");
    }
  }
}
