#include <bits/stdc++.h>
using namespace std;
const int maxn = 1000050;
int prime[maxn];
int a[maxn];
bool isprime[maxn];
bool beused[maxn];
int n, cnt;
int gcd(int a, int b) { return b == 0 ? a : gcd(b, a % b); }
void init() {
  cnt = 0;
  for (int i = 2; i < maxn; i++) {
    if (!isprime[i]) prime[++cnt] = i;
    for (int j = 1; j <= cnt; j++) {
      if (i * prime[j] >= maxn) break;
      isprime[i * prime[j]] = 1;
      if (i % prime[j] == 0) break;
    }
  }
}
void solve() {
  init();
  scanf("%d", &n);
  int GCD = 0;
  for (int i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
    beused[a[i]] = 1;
    GCD = gcd(GCD, a[i]);
  }
  int flag = 1;
  for (int i = 1; i <= 10; i++) {
    int tot = 0;
    for (int j = prime[i]; j < maxn; j += prime[i]) tot += beused[j];
    if (tot >= 2) {
      flag = 0;
      break;
    }
  }
  if (flag)
    printf("pairwise coprime\n");
  else if (!flag && GCD == 1)
    printf("setwise coprime\n");
  else
    printf("not coprime\n");
}
int main() {
  solve();
  return 0;
}
