#include <bits/stdc++.h>
using namespace std;
const long long MAX = 2e6 + 7;
long long n;
long long v[MAX], s[MAX], vv[MAX];
long long gcd(long long a, long long b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
void solve() {
  memset(v, 0, sizeof v);
  cin >> n;
  for (long long i = 0; i < n; i++) {
    long long x;
    cin >> x;
    v[x]++;
    vv[i] = x;
  }
  memset(s, 0, sizeof s);
  s[0] = s[1] = 1;
  long long ok = 1;
  for (long long i = 2; i < MAX; i++) {
    if (s[i]) continue;
    long long cnt = 0;
    for (long long j = i * i; j < MAX; j += i) {
      s[j] = 1;
      cnt += v[j];
    }
    if (cnt > 1) ok = 0;
  }
  if (ok) {
    cout << "pairwise coprime";
    return;
  }
  long long a = vv[0];
  for (long long i = 1; i < n; i++) {
    a = gcd(vv[i], a);
  }
  if (a == 1)
    cout << "setwise coprime";
  else
    cout << "not coprime";
}
int32_t main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  solve();
  return 0;
}
