#include <bits/stdc++.h>
using namespace std;
template <class T>
bool chmax(T& a, const T& b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T>
bool chmin(T& a, const T& b) {
  if (b < a) {
    a = b;
    return 1;
  }
  return 0;
}
long long int GCD(long long int x, long long int y) {
  if (x < y) swap(x, y);
  if (y == 0) {
    return x;
  } else {
    return GCD(y, x % y);
  }
}
long long int data[1000010];
bool dd[1000010];
bool prime[1000010];
void solve() {
  long long int n;
  cin >> n;
  vector<long long int> a(n);
  set<long long int> s;
  for (long long int i = 0; i < n; i++) {
    cin >> a[i];
    data[a[i]]++;
    dd[a[i]] = true;
    s.insert(a[i]);
  }
  if (s.size() != n) {
    cout << "not coprime" << endl;
    return;
  }
  for (long long int i = 0; i < 1000010; i++) prime[i] = true;
  bool ok = true;
  for (long long int i = 2; i <= 1000010; i++) {
    if (!prime[i]) continue;
    long long int now = i;
    long long int cnt = 1;
    long long int cc = 0;
    while (now < 1000010) {
      if (dd[now]) {
        data[now]--;
        cc++;
      }
      cnt++;
      now = i * cnt;
      if (now >= 1000010) break;
      prime[now] = false;
    }
    if (cc >= 2) {
      ok = false;
    }
  }
  if (ok) {
    cout << "pairwise coprime" << endl;
    return;
  }
  long long int nowG = a[0];
  for (long long int i = 1; i < n; i++) {
    nowG = GCD(nowG, a[i]);
  }
  if (nowG == 1) {
    cout << "setwise coprime" << endl;
  } else {
    cout << "not coprime" << endl;
  }
}
int main() {
  long long int t = 1;
  while (t--) solve();
  return 0;
}
