#include <bits/stdc++.h>
#pragma GCC target("avx2")
#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")
using namespace std;
int gcd(int x, int y) {
  if (x % y == 0)
    return y;
  else
    return gcd(y, x % y);
}
int main() {
  int N, i, j, k, a;
  scanf("%d", &N);
  set<int> A;
  int B[N];
  for (i = 0; i < N; i++) {
    scanf("%d", &a);
    B[i] = a;
    A.insert(a);
  }
  bool ok = true;
  int t;
  for (i = 2; i <= 1000000; i++) {
    t = 0;
    for (j = i; j <= 1000000; j += i) {
      if (A.count(j)) {
        t++;
      }
    }
    ok &= t <= 1;
  }
  if (ok) {
    printf("pairwise coprime\n");
    return 0;
  }
  int ans = B[0];
  for (i = 1; i < N; i++) ans = gcd(ans, B[i]);
  printf(ans == 1 ? "setwise coprime\n" : "not coprime\n");
}
