#include <bits/stdc++.h>
using namespace std;
using ll = long long;
double PI = acos(-1.0);
int INF = 1e9;
ll LINF = 1e18;
ll MOD = 1e9 + 7;
int main() {
  cin.tie(0);
  ios_base::sync_with_stdio(false);
  ll n, a, cnt = 1;
  cin >> n;
  vector<ll> table(1e6 + 1, 0);
  for (ll i = 0; i < (n); i++) {
    cin >> a;
    ll t = a;
    bool flag = true;
    for (ll j = 2; j * j <= a; j++) {
      if (t % j == 0) {
        while (t % j == 0) t /= j;
        table[j]++;
        cnt = max(cnt, table[j]);
        if (flag) flag = false;
        if (t == 1) break;
      }
    }
    if (flag && a != 1) {
      table[a]++;
      cnt = max(cnt, table[a]);
    }
  }
  if (cnt == 1)
    cout << "pairwise coprime" << endl;
  else if (cnt != n)
    cout << "setwise coprime" << endl;
  else
    cout << "not coprime" << endl;
  return 0;
}
