#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1000000007;
struct edge {
  int to, weight;
  edge(int to, int weight) : to(to), weight(weight) {}
};
using Graph = vector<vector<int>>;
using GraphEdge = vector<vector<int>>;
long long modinv(long long a, long long m = MOD) {
  long long b = m, u = 1, v = 0;
  while (b) {
    long long t = a / b;
    a -= t * b;
    swap(a, b);
    u -= t * v;
    swap(u, v);
  }
  u %= m;
  if (u < 0) u += m;
  return u;
}
int gcd(int a, int b) {
  if (a % b == 0) {
    return (b);
  } else {
    return (gcd(b, a % b));
  }
}
int lcm(int a, int b) { return a * b / gcd(a, b); }
vector<long long> prime;
const int MAXN = 1000001;
const int hal = 1001;
int di[MAXN];
bool ok[hal];
void prime_factorize(long long n) {
  if (n <= 1) return;
  long long l = sqrt(n);
  for (int i = 2; i <= l; i++) {
    if (n % i == 0) {
      prime_factorize(i);
      prime_factorize(long long(n / i));
      return;
    }
  }
  if (!ok[n]) {
    ok[n] = true;
    di[n]++;
  }
  return;
}
int main() {
  memset(di, 0, sizeof(di));
  int N;
  cin >> N;
  int A[MAXN];
  for (int i = 0; i < N; i++) cin >> A[i];
  for (int i = 0; i < N; i++) {
    memset(ok, false, sizeof(ok));
    prime_factorize(A[i]);
  }
  bool ans = false;
  for (int i = 2; i <= hal; i++) {
    if (di[i] > 1) {
      ans = true;
      long long tmp = A[0];
      for (int j = 1; j <= N - 1; j++) {
        tmp = gcd(A[j], tmp);
      }
      if (tmp == 1) {
        puts("setwise coprime");
        return 0;
      }
    }
  }
  if (ans) {
    cout << "not coprime" << endl;
    return 0;
  }
  cout << "pairwise coprime" << endl;
  return 0;
}
