#include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 10;
const int mod = 1e9 + 7;
const int inf = 0x3f3f3f3f;
long long n, cnt = 0;
long long a[N], f[N];
bool prime[N];
string s1, s2;
int main() {
  ios::sync_with_stdio(false);
  long long t, i, j = 0;
  long long m, x, y, k;
  memset(prime, true, sizeof(prime));
  for (i = 2; i <= N; i++) {
    if (prime[i]) {
      for (j = i * 2; j <= N; j += i) prime[j] = false;
    }
  }
  cin >> n;
  for (i = 0; i < n; i++) {
    cin >> x;
    if (prime[x])
      f[x]++;
    else {
      for (j = 2; j <= sqrt(x); j++) {
        if (x % j == 0) f[j]++;
        while (x % j == 0) x /= j;
      }
    }
  }
  bool f1 = true, f2 = true;
  for (i = 2; i <= N; i++) {
    if (f[i] > 1) f1 = false;
    if (f[i] >= n) f2 = false;
  }
  if (f1)
    cout << "pairwise coprime";
  else if (f2)
    cout << "setwise coprime";
  else
    cout << "not coprime";
  cout << endl;
  return 0;
}
