#include <bits/stdc++.h>
using namespace std;
struct FastIO {
  FastIO() {
    srand(time(NULL));
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);
    cout.precision(12);
  };
} fastIO_;
template <typename T1, typename T2>
inline ostream &operator<<(ostream &os, const pair<T1, T2> &p) {
  return os << "(" << p.first << ", " << p.second << ")";
}
template <typename T, size_t N>
inline ostream &operator<<(ostream &os, const array<T, N> &a) {
  bool first = true;
  os << "[";
  for (auto &v : a) {
    if (!first) os << ", ";
    os << v;
    first = false;
  }
  os << "]";
  return os;
}
template <typename T>
inline ostream &operator<<(ostream &os, const vector<T> &v) {
  bool first = true;
  os << "[";
  for (unsigned int i = 0; i < v.size(); i++) {
    if (!first) os << ", ";
    os << v[i];
    first = false;
  }
  return os << "]";
}
template <typename T>
inline ostream &operator<<(ostream &os, const set<T> &v) {
  bool first = true;
  os << "{";
  for (typename set<T>::const_iterator ii = v.begin(); ii != v.end(); ++ii) {
    if (!first) os << ", ";
    os << *ii;
    first = false;
  }
  return os << "}";
}
template <typename T>
inline ostream &operator<<(ostream &os, const multiset<T> &v) {
  bool first = true;
  os << "{";
  for (typename multiset<T>::const_iterator ii = v.begin(); ii != v.end();
       ++ii) {
    if (!first) os << ", ";
    os << *ii;
    first = false;
  }
  return os << "}";
}
template <typename T1, typename T2>
inline ostream &operator<<(ostream &os, const map<T1, T2> &v) {
  bool first = true;
  os << "[";
  for (typename map<T1, T2>::const_iterator ii = v.begin(); ii != v.end();
       ++ii) {
    if (!first) os << ", ";
    os << *ii;
    first = false;
  }
  return os << "]";
}
template <typename Arg1>
void __f(const char *name, Arg1 &&arg1) {
  cerr << name << ": " << arg1 << endl;
}
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...);
}
const long long MOD = 998244353;
const int dx[] = {-1, 1, 0, 0};
const int dy[] = {0, 0, 1, -1};
template <class T>
inline bool umin(T &a, const T b) {
  return b < a ? a = b, 1 : 0;
}
template <class T>
inline bool umax(T &a, const T b) {
  return a < b ? a = b, 1 : 0;
}
template <class T>
inline T gcd(T a, T b) {
  return b ? gcd(b, a % b) : a;
}
inline long long lcm(long long a, long long b) { return a / gcd(a, b) * b; }
long long power_mod(long long x, long long y, long long p) {
  long long ans = 1;
  x %= p;
  while (y > 0) {
    if (y & 1) ans = (ans * x) % p;
    y >>= 1;
    x = (x * x) % p;
  }
  return ans;
}
inline long long modInverse(long long n, long long p) {
  return power_mod(n, p - 2, p);
}
long long nCrModP(vector<long long> &fac, long long n, long long r,
                  long long p) {
  if (r == 0) return 1;
  return (fac[n] * modInverse(fac[r], p) % p * modInverse(fac[n - r], p) % p) %
         p;
}
template <typename T>
void print_vector(const vector<T> &v) {
  for (int i = 0; i < (((int)(v).size())); i++) {
    if (i > 0) cout << " ";
    cout << v[i] + 1;
  }
  cout << endl;
}
vector<int> init_primes(int n) {
  bool p[n];
  for (int i = 0; i < n; i++) p[i] = 1;
  for (int i = 4; i < n; i += 2) p[i] = 0;
  for (int i = 3; i * i < n; i += 2) {
    if (!p[i]) continue;
    for (int j = i * i; j < n; j += i) p[j] = 0;
  }
  vector<int> ret = {2};
  for (int i = 3; i < n; i += 2)
    if (p[i]) ret.push_back(i);
  return ret;
}
int n;
int a[1000006];
string solve() {
  for (int i = 0; i < (n); i++) cin >> a[i];
  int m = 1 + *max_element(a, a + n);
  vector<int> p = init_primes(m);
  int g = a[0];
  for (int i = (1); i < (n); i++) g = gcd(g, a[i]);
  unordered_map<int, int> cnt;
  for (int i = 0; i < (n); i++) {
    int b = a[i], j = 0;
    unordered_set<int> nums;
    while (j < ((int)(p).size()) && p[j] <= b) {
      while (b % p[j] == 0) {
        nums.insert(p[j]);
        b /= p[j];
      }
      j++;
    }
    assert(b == 1);
    for (int u : nums) cnt[u]++;
  }
  for (auto kv : cnt) {
    if (kv.second > 1) {
      return g == 1 ? "setwise coprime" : "not coprime";
    }
  }
  return "pairwise coprime";
}
void solve(int _cas) {
  string ans = solve();
  cout << ans << endl;
}
int main() {
  while (cin >> n) solve(1);
}
