#include <bits/stdc++.h>
using namespace std;
const int inf = 1 << 30;
const long long linf = 1LL << 62;
const int MAX = 1020000;
long long dy[8] = {1, -1, 0, 0, 1, -1, 1, -1};
long long dx[8] = {0, 0, 1, -1, 1, -1, -1, 1};
const double pi = acos(-1);
const double eps = 1e-7;
template <typename T1, typename T2>
inline bool chmin(T1 &a, T2 b) {
  if (a > b) {
    a = b;
    return true;
  } else
    return false;
}
template <typename T1, typename T2>
inline bool chmax(T1 &a, T2 b) {
  if (a < b) {
    a = b;
    return true;
  } else
    return false;
}
template <typename T>
inline void print(T &a) {
  for (auto itr = a.begin(); itr != a.end(); itr++) {
    cout << *itr << " ";
  }
  cout << "\n";
}
template <typename T1, typename T2>
inline void print2(T1 a, T2 b) {
  cout << "debug: " << a << " " << b << "\n";
}
template <typename T1, typename T2, typename T3>
inline void print3(T1 a, T2 b, T3 c) {
  cout << "debug: " << a << " " << b << " " << c << "\n";
}
void mark() {
  cout << "#"
       << "\n";
}
long long pcount(long long x) { return __builtin_popcountll(x); }
const int mod = 1e9 + 7;
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;
  int M = 1e6;
  vector<int> b(M + 1, 0);
  vector<bool> visit(M + 1, 0);
  int gc = 0;
  for (int i = 0; i < (n); i++) {
    int a;
    cin >> a;
    gc = GCD(gc, a);
    b[a]++;
  }
  if (gc > 1) {
    cout << "not coprime"
         << "\n";
    return 0;
  }
  for (int i = 1; i <= M; i++) {
    if (visit[i]) continue;
    int a = 0;
    for (int j = i; j <= M; j += i) {
      visit[j] = 1;
      a += b[j];
    }
    if (a >= 2) {
      cout << "pairwise coprime"
           << "\n";
      return 0;
    }
  }
  cout << "setwise coprime"
       << "\n";
}
