#include <bits/stdc++.h>
using namespace std;
constexpr long long MOD = 1e9 + 7;
template <typename T>
using pq = priority_queue<T>;
template <typename T>
using pqr = priority_queue<T, vector<T>, greater<T>>;
const long long INF = LLONG_MAX / 2;
using P = pair<long long, long long>;
using vec = vector<long long>;
template <typename T>
using mat = vector<vector<T>>;
template <typename T1, typename T2>
ostream& operator<<(ostream& stream, const pair<T1, T2>& p) {
  return stream << p.first << "," << p.second;
}
template <typename T>
void print(const vector<T> vec) {
  for (long long i = (0); i <= static_cast<long long>(vec.size() - 1 - 1); i++)
    cout << vec[i] << ' ';
  cout << vec[vec.size() - 1] << '\n';
}
template <typename Arg>
void print(const Arg arg) {
  cout << arg << '\n';
}
template <typename Head, typename... Args>
void print(const Head head, const Args... args) {
  cout << head << " ";
  print(args...);
}
template <typename T, typename U>
void init(vector<T>& v, vector<U>& w) {
  for (long long i = (0); i <= static_cast<long long>(v.size() - 1); i++)
    cin >> v[i] >> w[i];
}
template <typename T>
void init(vector<T>& v) {
  for (long long i = (0); i <= static_cast<long long>(v.size() - 1); i++)
    cin >> v[i];
}
template <typename T>
T sum_(vector<T> vec, T init = 0) {
  return std::accumulate((vec).begin(), (vec).end(), T(init));
}
template <typename T>
bool chmax(T& a, const T& b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
}
template <typename T>
bool chmin(T& a, const T& b) {
  if (a > b) {
    a = b;
    return true;
  }
  return false;
}
template <typename T>
long long index(const T& vec, const typename T::iterator it) {
  return distance(vec.begin(), it);
}
template <typename T = long long>
mat<T> mmat(long long n, long long m = 0) {
  return mat<T>(n, vector<T>(m));
}
template <typename T = long long>
vector<T> ivec(long long n) {
  vector<T> v(n);
  init(v);
  return v;
}
vector<long long> divisor(long long n) {
  vector<long long> v;
  for (long long i = 1; i * i <= n; i++) {
    if (n % i == 0) {
      v.push_back(i);
      if (i * i < n) v.push_back(n / i);
    }
  }
  return v;
}
map<long long, long long> prime_factor(long long n) {
  map<long long, long long> mp;
  while (true) {
    bool found = false;
    for (long long i = 2; i * i <= n; i++) {
      if (n % i == 0) {
        mp[i]++;
        found = true;
        n /= i;
        break;
      }
    }
    if (not found) {
      mp[n]++;
      break;
    }
  }
  return mp;
}
void yn(bool tf) { print(tf ? "Yes" : "No"); }
void YN(bool tf) { print(tf ? "YES" : "NO"); }
long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }
signed main() {
  cin.tie(0), cout.tie(0), ios::sync_with_stdio(false);
  long long n;
  cin >> n;
  vec a = ivec(n);
  map<long long, bool> mp;
  for (long long i = (0); i <= static_cast<long long>(n - 1); i++) {
    map<long long, long long> res = prime_factor(a[i]);
    bool ok = true;
    for (auto [k, v] : res) {
      if (mp[k]) {
        ok = false;
        break;
      } else {
        mp[k] = true;
      }
    }
    if (not ok) break;
    if (i == n - 1) {
      print("pairwise coprime");
      return 0;
    }
  }
  vec rui(n);
  rui[0] = a[0];
  for (long long i = (1); i <= static_cast<long long>(n - 1); i++)
    rui[i] = gcd(rui[i - 1], a[i]);
  if (rui[n - 1] == 1)
    print("setwise coprime");
  else
    print("not coprime");
  return 0;
}
