#include <bits/stdc++.h>
using namespace std;
const int INF = (long long int)(1LL << 30) - 1;
const double INFd = 100000000000.0;
const double PI = 3.14151926535;
const long long int INFl = (long long int)9223372036854775807;
const int MAX = 10000;
const long long int MOD = (long long int)1e9 + 7;
const long long int tMOD = (long long int)998244353;
long long int gcd(long long int a, long long int b) {
  return b ? gcd(b, a % b) : a;
}
long long int lcm(long long int a, long long int b) {
  return a / gcd(a, b) * b;
}
int dx[4] = {0, -1, 0, 1}, dy[4] = {-1, 0, 1, 0};
int mdx[8] = {0, 1, 0, -1, 1, 1, -1, -1}, mdy[8] = {-1, 0, 1, 0, 1, -1, 1, -1};
template <typename A, size_t N, typename T>
void Fill(A (&array)[N], const T &val) {
  std::fill((T *)array, (T *)(array + N), val);
}
int n;
int a[1000100];
vector<int> prime;
int setwise = 0;
int pairwise = 0;
int main() {
  cin >> n;
  for (long long int i = 0; i < n; i++) cin >> a[i];
  prime.push_back(2);
  for (int i = 3; i <= 1000; i++) {
    int flag = 1;
    for (int j = 0; j < prime.size() && prime[j] * prime[j] <= i; j++) {
      if (i % prime[j] == 0) {
        flag = 0;
        break;
      }
    }
  }
  int t = gcd(a[0], a[1]);
  for (int i = 2; i < n; i++) {
    t = gcd(t, a[i]);
  }
  if (t == 1) setwise = 1;
  int flag = 1;
  for (int i = 0; i < prime.size(); i++) {
    int co = 0;
    for (int j = 0; j < n; j++) {
      if (a[j] % prime[i] == 0) {
        co++;
      }
      if (co == 2) break;
    }
    if (co == 2) {
      flag = 0;
      break;
    }
  }
  if (flag) pairwise = 1;
  if (pairwise) {
    cout << "pairwise coprime" << endl;
  } else if (setwise) {
    cout << "setwise coprime" << endl;
  } else {
    cout << "not coprime" << endl;
  }
  return 0;
}
