#include <bits/stdc++.h>
namespace rG {
const int N = 1e6;
int n, m, k, a[N + 10];
char s[N + 10];
int prime[N + 10], totp, notPrime[N + 10];
std::set<int> cnt[N + 10];
int cntt[N + 10];
void init() {
  notPrime[1] = 1;
  for (int i = 2; i <= N; i++) {
    if (!notPrime[i]) prime[++totp] = i;
    for (int j = 1; j <= totp && i * prime[j] <= N; j++) {
      notPrime[i * prime[j]] = 1;
      if (i % prime[j] == 0) break;
    }
  }
}
int gcd(int x, int y) { return (!y) ? x : gcd(y, x % y); }
inline void main() {
  init();
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%d", a + i);
    for (int j = 1; j <= totp && prime[j] * prime[j] <= a[i]; j++)
      if (a[i] % prime[j] == 0) {
        cntt[prime[j]]++;
      }
  }
  bool f1 = 1;
  for (int i = 1; i <= totp; i++)
    if (cntt[prime[i]] >= 2) {
      f1 = 0;
      break;
    }
  if (f1 == 1) return puts("pairwise coprime"), void();
  int gcdd = a[1];
  for (int i = 2; i <= n; i++) gcdd = gcd(gcdd, a[i]);
  if (gcdd == 1)
    return puts("setwise coprime"), void();
  else
    puts("not coprime");
}
}  // namespace rG
int main() {
  rG::main();
  return 0;
}
