#include <bits/stdc++.h>
using namespace std;
const long long N = 1e6 + 1;
const long long M = 1e9 + 7;
long long Gcd(long long a, long long b) {
  if (a == 0) return b;
  return Gcd(b % a, a);
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(NULL);
  long long t = 1;
  for (long long _ = 1; _ <= t; _ += 1) {
    long long n;
    cin >> n;
    long long ar[n];
    for (long long i = 0; i <= n - 1; i += 1) cin >> ar[i];
    long long gcd = 0;
    for (long long i = 0; i <= n - 1; i += 1) gcd = Gcd(gcd, ar[i]);
    map<long long, long long> sm_fac;
    for (long long i = 2; i * i <= N; i++) {
      if (sm_fac[i]) continue;
      sm_fac[i] = i;
      for (long long j = i * i; j <= N; j += i) {
        if (!sm_fac[j]) sm_fac[j] = i;
      }
    }
    map<long long, long long> vis;
    for (long long i = 0; i <= n - 1; i += 1) {
      long long cur = ar[i];
      while (cur != 1) {
        long long fac = 1;
        fac = sm_fac[cur];
        if (vis.find(fac) != vis.end()) {
          if (gcd == 1)
            cout << "setwise coprime";
          else
            cout << "not coprime";
          return 0;
        }
        vis[fac] = 1;
        while (cur % fac == 0) cur /= fac;
      }
    }
    cout << "pairwise coprime";
    cout << "\n";
  }
}
