#include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 10;
int b[N];
inline void fj(int x) {
  int i = 2;
  while (x != 1) {
    if (x % i == 0) b[i]++;
    while (x % i == 0) x /= i;
    i++;
  }
}
int main() {
  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";
}
