#include <bits/stdc++.h>
using namespace std;
template <class T>
inline bool chmax(T& a, T b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T>
inline bool chmin(T& a, T b) {
  if (a > b) {
    a = b;
    return 1;
  }
  return 0;
}
long long GCD(long long a, long long b) {
  if (b == 0)
    return a;
  else
    return GCD(b, a % b);
}
const int X = 1e+3;
vector<bool> isp(X, true);
void sieve() {
  isp[0] = false;
  isp[1] = false;
  for (int i = 2; pow(i, 2) <= X; i++) {
    if (isp[i])
      for (int j = 2; i * j <= X; j++) isp[i * j] = false;
  }
}
int main() {
  int N;
  cin >> N;
  vector<int> A(N);
  for (int i = 0; i < (int)(N); i++) cin >> A[i];
  sieve();
  vector<int> Y;
  for (int i = 2; i <= X; ++i) {
    if (isp[i]) Y.push_back(i);
  }
  bool pairwise = true;
  for (auto i : Y) {
    int num = 0;
    for (int j = 0; j < N; ++j) {
      if (A[j] % i == 0) ++num;
    }
    if (num >= 2) pairwise = false;
  }
  bool setwise;
  long long x = A[0];
  for (int i = 1; i < N; ++i) {
    x = GCD(A[i], x);
  }
  if (x == 1)
    setwise = true;
  else
    setwise = false;
  if (pairwise) {
    cout << "pairwise coprime" << endl;
  } else if (setwise) {
    cout << "setwise coprime" << endl;
  } else {
    cout << "not coprime" << endl;
  }
  return 0;
}
