#include <bits/stdc++.h>
using namespace std;
using Edge = pair<long long, long long>;
using Graph = vector<vector<int>>;
inline int toInt(string s) {
  int v;
  istringstream sin(s);
  sin >> v;
  return v;
}
template <class T>
inline string toString(T x) {
  ostringstream sout;
  sout << x;
  return sout.str();
}
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;
}
const int dx[4] = {0, 1, 0, -1}, dy[4] = {1, 0, -1, 0};
long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }
long long lcm(long long a, long long b) { return a / gcd(a, b) * b; }
int main() {
  long long N;
  cin >> N;
  long long A[N];
  for (int i = (0); i < (N); ++i) cin >> A[i];
  long long g = A[0];
  for (int i = 1; i < N; ++i) g = gcd(g, A[i]);
  if (g != 1) {
    cout << "not coprime" << '\n';
    return 0;
  }
  map<long long, long long> M;
  for (int i = (0); i < (N); ++i) M[A[i]]++;
  for (int i = 2; i <= 1010101; ++i) {
    if (M[i] >= 2) {
      cout << "setwise coprime" << '\n';
      return 0;
    }
  }
  long long cnt = 0;
  for (int i = 2; i <= 1010101; i += 2) {
    cnt = 0;
    for (int j = i; j <= 1010101; j += i) {
      if (M[j] > 0) cnt++;
      if (cnt >= 2) {
        cout << "setwise coprime" << '\n';
        return 0;
      }
    }
    if (i == 2) i--;
  }
  cout << "pairwise coprime" << '\n';
  return 0;
}
