#include <bits/stdc++.h>
using namespace std;
const long long M = 1e5 + 10, M2 = 1e6 + 10, oo = 1e9 + 7;
bool ispr[M2];
int ara[M2], sp[M2];
void sieve() {
  ispr[0] = 1, ispr[1] = 1;
  for (long long i = 2; i < M2; i++) {
    if (!ispr[i]) {
      sp[i] = i;
      for (long long j = i * i; j < M2; j += i) {
        ispr[j] = 1;
        sp[j] = i;
      }
    }
  }
}
vector<int> pf[M2];
void fact() {
  for (int n = 1; n < M2; n++) {
    int tn = n;
    while (tn > 1) {
      int f = sp[tn];
      pf[n].push_back(f);
      while (tn % f == 0 && tn > 1) tn /= f;
    }
  }
}
int cnt[M2];
void solve() {
  sieve();
  fact();
  long long n;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> ara[i];
    for (int j = 0; j < pf[ara[i]].size(); j++) {
      cnt[pf[ara[i]][j]]++;
    }
  }
  long long mx = *max_element(cnt, cnt + M2);
  if (mx == 1)
    cout << "pairwise coprime" << endl;
  else if (mx < n)
    cout << "setwise coprime" << endl;
  else
    cout << "not coprime" << endl;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  solve();
  return 0;
}
