#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
using Graph = vector<vector<int>>;
const double PI = 3.14159265358979323846;
const int dx[4] = {1, 0, -1, 0};
const int dy[4] = {0, 1, 0, -1};
ll gcd(ll x, ll y) { return (x % y) ? gcd(y, x % y) : y; }
ll lcm(ll x, ll y) { return x / gcd(x, y) * y; }
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((ret).begin(), (ret).end());
  return ret;
}
int main() {
  int n;
  cin >> n;
  vector<ll> a(n);
  vector<vector<ll>> adiv(n);
  ll minP = 1000001;
  for (ll i = 0; i < (ll)(n); i++) {
    cin >> a[i];
    adiv[i] = divisor(a[i]);
    minP = min(minP, adiv[i][1]);
  }
  int setwise = gcd(a[0], a[1]);
  for (ll i = 0; i < (ll)(n); i++) {
    setwise = gcd(setwise, a[i]);
    if (setwise == 1) break;
  }
  bool pairwise = true;
  int cnt = 0;
  for (ll i = 0; i < (ll)(n); i++) {
    if (minP == adiv[i][1]) cnt++;
    if (cnt > 1) {
      pairwise = false;
      break;
    }
  }
  if (pairwise)
    cout << "pairwise coprime" << endl;
  else {
    if (setwise == 1)
      cout << "setwise coprime" << endl;
    else
      cout << "not coprime" << endl;
  }
  return 0;
}
