#include <bits/stdc++.h>
using namespace std;
const int MOD = 1e9 + 7;
const int oo = 987654321;
const long long OO = 1e18;
template <typename A, typename B>
std::ostream& operator<<(std::ostream& out, const pair<A, B>& a) {
  out << "(" << a.first << "," << a.second << ")";
  return out;
}
template <typename T, size_t N>
std::ostream& operator<<(std::ostream& out, const array<T, N>& a) {
  out << "[";
  bool first = true;
  for (auto& v : a) {
    out << (first ? "" : ", ");
    out << v;
    first = 0;
  }
  out << "]";
  return out;
}
template <typename T, class Cmp>
std::ostream& operator<<(std::ostream& out, const set<T, Cmp>& a) {
  out << "{";
  bool first = true;
  for (auto& v : a) {
    out << (first ? "" : ", ");
    out << v;
    first = 0;
  }
  out << "}";
  return out;
}
template <typename U, typename T, class Cmp>
std::ostream& operator<<(std::ostream& out, const map<U, T, Cmp>& a) {
  out << "{";
  bool first = true;
  for (auto& p : a) {
    out << (first ? "" : ", ");
    out << p.first << ":" << p.second;
    first = 0;
  }
  out << "}";
  return out;
}
template <typename T>
std::ostream& operator<<(std::ostream& out, const list<T>& a) {
  out << "[";
  bool first = true;
  for (auto& v : a) {
    out << (first ? "" : ", ");
    out << v;
    first = 0;
  }
  out << "]";
  return out;
}
template <typename A, typename B>
std::istream& operator>>(std::istream& in, pair<A, B>& a) {
  in >> a.first >> a.second;
  return in;
}
template <typename T>
std::istream& operator>>(std::istream& in, vector<T>& a) {
  for (auto& v : a) in >> v;
  return in;
}
template <typename T>
std::ostream& operator<<(std::ostream& out, const vector<T>& a) {
  for (const auto& v : a) out << v << ' ';
  return out;
}
template <typename Arg1>
void __f(const char* name, Arg1&& arg1) {
  cerr << name << ": " << arg1 << '\n';
}
template <typename Arg1, typename... Args>
void __f(const char* names, Arg1&& arg1, Args&&... args) {
  const char* comma = strchr(names + 1, ',');
  cerr.write(names, comma - names) << ": " << arg1 << " | ";
  __f(comma + 1, args...);
}
template <typename Arg1>
void __g(Arg1&& arg1) {
  cout << arg1;
}
template <typename Arg1, typename... Args>
void __g(Arg1&& arg1, Args&&... args) {
  cout << arg1 << ' ';
  __g(args...);
}
template <typename Arg1>
void __h(Arg1&& arg1) {
  cout << arg1 << '\n';
}
template <typename Arg1, typename... Args>
void __h(Arg1&& arg1, Args&&... args) {
  cout << arg1 << ' ';
  __h(args...);
}
template <typename Arg1>
void __i(Arg1&& arg1) {
  cin >> arg1;
}
template <typename Arg1, typename... Args>
void __i(Arg1&& arg1, Args&&... args) {
  cin >> arg1;
  __i(args...);
}
class Timer {
  clock_t start;

 public:
  Timer() { start = clock(); }
  ~Timer() { cerr << (double)(clock() - start) / CLOCKS_PER_SEC << "\n"; }
};
void solve() {
  int n;
  __i(n);
  vector<int> a(n);
  __i(a);
  map<int, int> c;
  bool p = 1;
  for (int(i) = 0; (i) < (n); (i)++) {
    for (int j = 2; j * j <= a[i]; j++) {
      bool ok = 0;
      while (a[i] % j == 0) {
        ok = 1;
        a[i] /= j;
      }
      if (ok) {
        if (c[j] > 0) {
          p = 0;
        }
        c[j]++;
      }
    }
    if (a[i] > 1) c[a[i]]++;
  }
  if (p) {
    __h("pairwise coprime");
    return;
  }
  for (auto i : c) {
    if (i.second >= n) {
      __h("not coprime");
      return;
    }
  }
  __h("setwise coprime");
}
signed main() {
  Timer ti;
  std::ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.tie(nullptr);
  int T = 1;
  for (int t = 1; t <= T; t++) {
    solve();
  }
  return 0;
}
