#include <bits/stdc++.h>
using namespace std;
const long long mod = 1000000007;
template <class T>
void out(T a) {
  cout << a << '\n';
}
template <class T>
void outp(T a) {
  cout << '(' << a.fi << ',' << a.se << ')' << '\n';
}
template <class T>
void outvp(T v) {
  for (int i = 0; i < v.size(); i++)
    cout << '(' << v[i].fi << ',' << v[i].se << ')';
  cout << '\n';
}
template <class T>
void outvvp(T v) {
  for (int i = 0; i < v.size(); i++) outvp(v[i]);
}
template <class T>
void outv(T v) {
  for (int i = 0; i < v.size(); i++) {
    if (i) cout << ' ';
    cout << v[i];
  }
  cout << '\n';
}
template <class T>
void outvv(T v) {
  for (int i = 0; i < v.size(); i++) outv(v[i]);
}
template <class T>
bool isin(T x, T l, T r) {
  return (l) <= (x) && (x) <= (r);
}
template <class T>
void yes(T b) {
  if (b)
    out("yes");
  else
    out("no");
}
template <class T>
void Yes(T b) {
  if (b)
    out("Yes");
  else
    out("No");
}
template <class T>
void YES(T b) {
  if (b)
    out("YES");
  else
    out("NO");
}
template <class T>
void no(T b) {
  if (b)
    out("no");
  else
    out("yes");
}
template <class T>
void No(T b) {
  if (b)
    out("No");
  else
    out("Yes");
}
template <class T>
void NO(T b) {
  if (b)
    out("NO");
  else
    out("YES");
}
template <class T>
int sint(T s) {
  int n;
  sscanf(s.c_str(), "%d", &n);
  return n;
}
template <typename T>
void cSort(vector<T>& v) {
  size_t h = (v.size() * 10) / 13;
  bool is_sorted = false;
  while (!is_sorted) {
    if (h == 1) is_sorted = true;
    for (size_t i = 0; i < v.size() - h; ++i) {
      if (v[i] > v[i + h]) {
        swap(v[i], v[i + h]);
        if (is_sorted) is_sorted = false;
      }
    }
    if (h > 1) h = (h * 10) / 13;
    if (h == 0) h = 1;
  }
}
long long gcd(long long a, long long b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
long long modpow(long long a, long long b) {
  long long res = 1;
  a %= mod;
  while (b) {
    if (b & 1) res = res * a % mod;
    a = a * a % mod;
    b >>= 1;
  }
  return res;
}
template <int MOD>
struct ModInt {
  int val;
  ModInt(long long v = 0) : val(v % MOD) {
    if (val < 0) val += MOD;
  };
  ModInt operator+() const { return ModInt(val); }
  ModInt operator-() const { return ModInt(MOD - val); }
  ModInt inv() const { return this->pow(MOD - 2); }
  ModInt operator+(const ModInt& x) const { return ModInt(*this) += x; }
  ModInt operator-(const ModInt& x) const { return ModInt(*this) -= x; }
  ModInt operator*(const ModInt& x) const { return ModInt(*this) *= x; }
  ModInt operator/(const ModInt& x) const { return ModInt(*this) /= x; }
  ModInt pow(long long n) const {
    auto x = ModInt(1);
    auto b = *this;
    while (n > 0) {
      if (n & 1) x *= b;
      n >>= 1;
      b *= b;
    }
    return x;
  }
  ModInt& operator+=(const ModInt& x) {
    if ((val += x.val) >= MOD) val -= MOD;
    return *this;
  }
  ModInt& operator-=(const ModInt& x) {
    if ((val -= x.val) < 0) val += MOD;
    return *this;
  }
  ModInt& operator*=(const ModInt& x) {
    val = long long(val) * x.val % MOD;
    return *this;
  }
  ModInt& operator/=(const ModInt& x) { return *this *= x.inv(); }
  bool operator==(const ModInt& b) const { return val == b.val; }
  bool operator!=(const ModInt& b) const { return val != b.val; }
  friend istream& operator>>(istream& is, ModInt& x) noexcept {
    return is >> x.val;
  }
  friend ostream& operator<<(ostream& os, const ModInt& x) noexcept {
    return os << x.val;
  }
};
constexpr int MOD = 1e9 + 7;
using mint = ModInt<MOD>;
vector<long long> Eratosthenes(long long N) {
  int arr[101010];
  for (int i = 0; i < N; i++) {
    arr[i] = 1;
  }
  for (int i = 2; i < sqrt(N); i++) {
    if (arr[i]) {
      for (int j = 0; i * (j + 2) < N; j++) {
        arr[i * (j + 2)] = 0;
      }
    }
  }
  vector<long long> sosu;
  for (int i = 2; i < N; i++) {
    if (arr[i]) {
      sosu.push_back(i);
    }
  }
  return sosu;
}
long long a[2010101];
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  long long x[201010] = {};
  long long n;
  cin >> n;
  long long ma = 0;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    ma = ma > a[i] ? ma : a[i];
  }
  vector<long long> v = Eratosthenes(sqrt(ma) + 10);
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < v.size(); j++) {
      if (a[i] % v[j] == 0) {
        x[j]++;
      }
    }
  }
  bool pa = 1;
  bool se = 1;
  for (int i = 0; i < v.size(); i++) {
    if (x[i] > 1) {
      pa = 0;
    }
    if (x[i] == n) {
      se = 0;
    }
  }
  if (pa)
    out("pairwise coprime");
  else if (se)
    out("setwise coprime");
  else
    out("not coprime");
}
