#include <bits/stdc++.h>
using namespace std;
long long spf[1000005];
void sieve() {
  for (__typeof(1000005) i = (0) - ((0) > (1000005));
       i != (1000005) - ((0) > (1000005)); i += 1 - 2 * ((0) > (1000005)))
    spf[i] = i;
  for (__typeof(1005) i = (2) - ((2) > (1005)); i != (1005) - ((2) > (1005));
       i += 1 - 2 * ((2) > (1005)))
    if (spf[i] == i)
      for (long long j = i * i; j < 1000005; j += i) spf[j] = i;
}
int main(void) {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  sieve();
  long long n;
  cin >> n;
  long long ar[n];
  for (__typeof(n) i = (0) - ((0) > (n)); i != (n) - ((0) > (n));
       i += 1 - 2 * ((0) > (n)))
    cin >> ar[i];
  long long cnt[1000005] = {0};
  for (__typeof(n) i = (0) - ((0) > (n)); i != (n) - ((0) > (n));
       i += 1 - 2 * ((0) > (n))) {
    long long tmp = ar[i];
    while (tmp != 1) {
      cnt[spf[tmp]]++;
      long long sp = spf[tmp];
      while (spf[tmp] == sp) tmp /= spf[tmp];
    }
  }
  long long flag1 = 1, flag2 = 1;
  for (__typeof(1000001) i = (1) - ((1) > (1000001));
       i != (1000001) - ((1) > (1000001)); i += 1 - 2 * ((1) > (1000001))) {
    if (cnt[i] > 1) flag1 = 0;
    if (cnt[i] == n) flag2 = 0;
  }
  if (flag1) {
    cout << "pairwise coprime" << '\n';
    return 0;
  }
  if (flag2) {
    cout << "setwise coprime" << '\n';
    return 0;
  }
  cout << "not coprime" << '\n';
  return 0;
}
