#include <bits/stdc++.h>
using namespace std;
int recur_depth = 0;
template <typename Ostream, typename Cont>
typename enable_if<is_same<Ostream, ostream>::value, Ostream&>::type operator<<(
    Ostream& os, const Cont& v) {
  os << "[";
  for (auto& x : v) {
    os << x << ", ";
  }
  return os << "]";
}
template <typename Ostream, typename... Ts>
Ostream& operator<<(Ostream& os, const pair<Ts...>& p) {
  return os << "{" << p.first << ", " << p.second << "}";
}
const string s1 = "pairwise coprime";
const string s2 = "setwise coprime";
const string s3 = "not coprime";
int gcd(int a, int b) { return (b == 0 ? a : gcd(b, a % b)); }
void solve() {
  int n;
  cin >> n;
  int a[n];
  for (int i = 0; i < n; i++) cin >> a[i];
  int gcd_suff[n];
  gcd_suff[n - 1] = a[n - 1];
  for (int i = n - 2; ~i; --i) {
    gcd_suff[i] = gcd(gcd_suff[i + 1], a[i]);
  }
  int ok = true;
  for (int i = 0; i < n - 1; i++) {
    if (gcd_suff[i] != 1) ok = false;
  }
  if (ok) {
    cout << s1 << endl;
    return;
  }
  if (gcd_suff[0] == 1) {
    cout << s2 << endl;
    return;
  }
  cout << s3 << endl;
  return;
}
int main() {
  ios_base::sync_with_stdio(false);
  ;
  solve();
}
