#include <bits/stdc++.h>
const long long INF = 1LL << 60;
using namespace std;
using ll = long long;
using P = pair<int, int>;
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);
}
int main() {
  int N;
  cin >> N;
  vector<int> A(N);
  for (int i = 0; i < (N); i++) cin >> A[i];
  int g = 0;
  for (int i = 0; i < (N - 1); i++)
    for (int j = i + 1; j < (N); j++) {
      g = GCD(g, A[i]);
      if (GCD(A[i], A[j]) != 1) {
        for (int k = i + 1; k < (N); k++) {
          g = GCD(g, A[k]);
          if (g == 1) {
            cout << "setwise coprime" << endl;
            return 0;
          }
        }
        if (g == 1) {
          cout << "setwise coprime" << endl;
          return 0;
        } else {
          cout << "not coprime" << endl;
          return 0;
        }
      }
    }
  cout << "pairwise coprime" << endl;
  return 0;
}
