#include <bits/stdc++.h>
using namespace std;
const long long mod = 1000000007;
const double PI = acos(-1.0);
const double epsilon = PI / 180.0;
long long powmod(long long a, long long b) {
  long long res = 1;
  a %= mod;
  assert(b >= 0);
  for (; b; b >>= 1) {
    if (b & 1) res = res * a % mod;
    a = a * a % mod;
  }
  return res;
}
long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }
const int N = 1e6 + 10, M = 1e6 + 10;
int n;
int a[N];
int prime[N], f[N];
int main() {
  for (int i = 2; i * i <= 1e6; i++) {
    for (int j = i * 2; j <= 1e6; j += i) {
      prime[j] = 1;
    }
  }
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> a[i];
  int tmp = a[1];
  for (int i = 2; i <= n; i++) {
    tmp = gcd(tmp, a[i]);
  }
  if (tmp != 1) {
    cout << "not coprime\n";
    return 0;
  }
  for (int i = 1; i <= n; i++) {
    if (a[i] == 1) continue;
    if (!prime[a[i]]) {
      if (f[a[i]]) {
        cout << "setwise coprime\n";
        return 0;
      }
      f[a[i]] = 1;
      continue;
    }
    for (int j = 2; j * j <= a[i]; j++) {
      if (a[i] % j == 0) {
        if (f[j]) {
          cout << "setwise coprime\n";
          return 0;
        }
        f[j] = 1;
      }
      for (; a[i] % j == 0; a[i] /= j) {
      }
    }
    if (a[i] != 0) {
      if (f[a[i]]) {
        cout << "setwise coprime\n";
        return 0;
      }
      f[a[i]] = 1;
    }
  }
  cout << "pairwise coprime\n";
  return 0;
}
