#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
using namespace std;
struct __INIT {
  __INIT() {
    cin.tie(0);
    ios::sync_with_stdio(false);
    cout << fixed << setprecision(15);
  }
} __init;
constexpr int MOD = 1000000007;
int dx[8] = {1, 1, 0, -1, -1, -1, 0, 1};
int dy[8] = {0, 1, 1, 1, 0, -1, -1, -1};
const int MAX_N = 2e5 + 5;
long long LCM(long long a, long long b) {
  if (a == 0 || b == 0) return 0;
  long long tmp, r, x;
  x = a * b;
  if (a < b) tmp = a, a = b, b = tmp;
  r = a % b;
  while (r != 0) a = b, b = r, r = a % b;
  x = x / b;
  return x;
}
long long GCD(long long a, long long b) {
  if (a == 0 || b == 0)
    return max(a, b);
  else
    return (a * b) / LCM(a, b);
}
long long num[1000001];
int main(void) {
  int N;
  cin >> N;
  long long A[N];
  for (long long(i) = 0; (i) < (N); (i)++) cin >> A[i];
  for (long long(i) = 0; (i) < (N); (i)++) num[A[i]]++;
  bool che = true;
  for (int i = 2; i <= 1000000; i++) {
    int cnt = 0;
    for (int j = i; j <= 1000000; j += i) {
      if (cnt && num[j]) che = false;
      cnt += num[j];
    }
  }
  if (che) {
    cout << "pairwise coprime"
         << "\n";
    return 0;
  }
  long long now = A[0];
  for (int i = 1; i < N; i++) now = GCD(now, A[i]);
  if (now == 1)
    cout << "setwise coprime"
         << "\n";
  else
    cout << "not coprime"
         << "\n";
}
