#include <bits/stdc++.h>
#pragma GCC optimize("O3")
using namespace std;
void d_err() { cerr << endl; }
template <typename H, typename... T>
void d_err(H h, T... t) {
  cerr << h << " ";
  d_err(t...);
}
template <typename T>
void print(T x) {
  cout << x << "\n";
}
long long INF = 1e16;
int inf = 1e9;
long long MOD = 1e9 + 7;
long long gcd(long long a, long long b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
long long lcm(long long a, long long b) { return a / gcd(a, b) * b; }
int main() {
  cin.tie(0);
  ios_base::sync_with_stdio(false);
  cout << fixed << setprecision(20);
  int n;
  cin >> n;
  vector<long long> a(n);
  for (int i = (0); i < (n); ++i) cin >> a[i];
  long long g = a[0];
  for (int i = (0); i < (n); ++i) g = gcd(g, a[i]);
  long long l = a[0];
  for (int i = (0); i < (n); ++i) l = lcm(l, a[i]);
  long long mul = 1;
  for (int i = (0); i < (n); ++i) mul *= a[i];
  if (l == mul) {
    print("pairwise coprime");
  } else {
    if (g == 1)
      print("setwise coprime");
    else
      print("not coprime");
  }
}
