#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }
const long long SZ = 1e6;
template <long long N>
struct Prime {
  bitset<N + 1> b;
  Prime() : b() {
    b.flip();
    b[0] = b[1] = false;
    for (long long i = 2; i <= N; ++i) {
      if (b[i]) {
        for (long long j = i * i; j <= N; j += i) {
          b[j] = false;
        }
      }
    }
  }
};
Prime<SZ> prime;
void solve() {
  long long N;
  cin >> N;
  vector<long long> A(N), D(SZ + 1);
  for (auto &x : A) {
    cin >> x;
    D[x]++;
  }
  for (auto &x : A) {
    if (prime.b[x]) {
      long long cnt = 0;
      for (long long i = x; i <= SZ; i += x) {
        if (prime.b[i]) {
          cnt += D[i];
        }
      }
      if (cnt >= 2) {
        cout << "pairwise coprime\n";
        return;
      }
    }
  }
  long long g = A[0];
  for (auto &x : A) {
    g = gcd(g, x);
  }
  if (g == 1) {
    cout << "setwise coprime\n";
  } else {
    cout << "not coprime\n";
  }
}
signed main() {
  cin.tie(nullptr)->sync_with_stdio(false);
  solve();
}
