#include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 10;
int b[N], r[N];
bool a[N];
int t;
inline void fj(int x) {
  int i = 2;
  for (int i = 1; x != 1 && i <= t; i++) {
    if (x % r[i] == 0) b[r[i]]++;
    while (x % r[i] == 0) x /= r[i];
  }
}
int main() {
  a[0] = a[1] = true;
  for (int i = 2; i < N; i++)
    if (!a[i]) {
      r[++t] = i;
      for (int j = 2; j * i < N; j++) a[i * j] = true;
    }
  int n;
  cin >> n;
  int x;
  for (int i = 1; i <= n; i++) {
    scanf("%d", &x);
    fj(x);
  }
  for (int i = 1; i < N; i++)
    if (b[i] == n) {
      cout << "not coprime\n";
      return 0;
    }
  for (int i = 1; i < N; i++)
    if (b[i] > 1) {
      cout << "setwise coprime\n";
      return 0;
    }
  cout << "pairwise coprime\n";
}
