#include <bits/stdc++.h>
using namespace std;
template <class T>
bool chmax(T& a, const T& b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T>
bool chmin(T& a, const T& b) {
  if (b < a) {
    a = b;
    return 1;
  }
  return 0;
}
long long int GCD(long long int x, long long int y) {
  if (x < y) swap(x, y);
  if (y == 0) {
    return x;
  } else {
    return GCD(y, x % y);
  }
}
long long int LCM(long long int a, long long int b) {
  return a / GCD(a, b) * b;
}
long long int d[1000100];
bool vis[1000100];
void func(long long N, std::vector<long long> A) {
  long long int now = A[0];
  for (int i = 1; i < N; i++) {
    now = GCD(now, A[i]);
  }
  if (now != 1) {
    cout << "not coprime" << endl;
    return;
  }
  set<long long int> s;
  for (int i = 0; i < N; i++) {
    s.insert(A[i]);
    d[A[i]] = 1;
  }
  if (s.size() != N) {
    cout << "setwise coprime" << endl;
    return;
  }
  bool ok = true;
  for (long long int i = 2; i < 1000100; i++) {
    if (vis[i]) continue;
    if (!ok) break;
    long long int now = i;
    long long int cnt = 0;
    while (now < 1000100) {
      vis[now] = true;
      if (d[now]) cnt++;
      if (cnt >= 2) {
        ok = false;
        break;
      }
      now += i;
    }
  }
  if (ok) {
    cout << "pairwise coprime" << endl;
  } else {
    cout << "setwise coprime" << endl;
  }
}
int main() {
  long long N;
  scanf("%lld", &N);
  std::vector<long long> A(N);
  for (int i = 0; i < N; i++) {
    scanf("%lld", &A[i]);
  }
  func(N, std::move(A));
  return 0;
}
