#include <bits/stdc++.h>
using namespace std;
long long sqrt(long long x) {
  long long lhs = 0;
  long long rhs = x;
  while (lhs + 1 < rhs) {
    long long mid = (lhs + rhs) / 2;
    if (mid * mid < x) {
      lhs = mid;
    } else {
      rhs = mid;
    }
  }
  return rhs;
}
vector<long long> upf(long long x) {
  vector<long long> rv;
  long long srx = sqrt(x);
  for (long long i = 2; i <= srx; ++i) {
    if (x % i == 0) {
      rv.push_back(i);
    }
  }
  return rv;
}
bool pc(vector<long long>& A) {
  vector<bool> d(1e6 + 1, false);
  for (auto ai : A) {
    auto pf = upf(ai);
    for (long long pfi : pf) {
      if (d[pfi]) {
        return false;
      }
      d[pfi] = true;
    }
  }
  return true;
}
long long gcd(long long a, long long b) {
  if (a < b) {
    swap(a, b);
  }
  while (b) {
    a %= b;
    swap(a, b);
  }
  return a;
}
bool sc(vector<long long>& A) {
  long long g = A[0];
  for (auto ai : A) {
    g = gcd(g, ai);
  }
  return (g == 1);
}
void solve(long long N, std::vector<long long> A) {
  if (sc(A)) {
    if (pc(A)) {
      cout << "pairwise coprime";
    } else {
      cout << "setwise coprime";
    }
  } else {
    cout << "not coprime";
  }
  cout << 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]);
  }
  solve(N, std::move(A));
  return 0;
}
