#include <bits/stdc++.h>
using namespace std;
const int N = 1e7 + 100;
int n, flag, ans, i, j, a[N], vis[N], f[N];
void ss(int n) {
  int i, j;
  f[0] = f[1] = 1;
  for (i = 2; i * i <= n; i++)
    for (j = 2; i * j <= n; j++) f[i * j] = 1;
  return;
}
int gcd(int a, int b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
int main() {
  ss(N);
  cin >> n;
  for (i = 1; i <= n; i++) cin >> a[i];
  ans = a[1];
  for (i = 2; i <= n; i++) ans = gcd(ans, a[i]);
  if (ans != 1)
    cout << "not coprime\n";
  else {
    for (i = 1; i <= n; i++)
      for (j = 2; j <= sqrt(a[i]) + 1; j++) {
        if (a[i] % j != 0 || f[j]) continue;
        if (vis[j]) {
          cout << "setwise coprime\n";
          return 0;
        } else
          vis[j] = 1;
        while (a[i] % j == 0) a[i] /= j;
      }
    cout << "pairwise coprime\n";
  }
  return 0;
}
