#include <bits/stdc++.h>
using namespace std;
const long long int mod = 1e9 + 7;
const long long int inf = 2e9 + 5;
double PI = 3.14159265358979323846;
template <long long int M>
struct ModInt {
  int val;
  ModInt(long long int x = 0) : val((x % M + M) % M) {}
  ModInt pow(long long int n) const {
    ModInt ans = 1, x = val;
    while (n) {
      if (n & 1) ans *= x;
      x *= x;
      n /= 2;
    }
    return ans;
  }
  ModInt inverse() const { return pow(M - 2); }
  ModInt operator+(const ModInt& m) {
    return val + m.val < M ? val + m.val : val + m.val - M;
  }
  ModInt operator-(const ModInt& m) {
    return val - m.val >= 0 ? val - m.val : val - m.val + M;
  }
  ModInt operator*(const ModInt& m) { return val * (long long int)m.val % M; }
  ModInt operator/(const ModInt& m) { return *this * m.inverse(); }
  ModInt operator+=(const ModInt& m) { return *this = *this + m; }
  ModInt operator-=(const ModInt& m) { return *this = *this - m; }
  ModInt operator*=(const ModInt& m) { return *this = *this * m; }
  ModInt operator/=(const ModInt& m) { return *this = *this / m; }
  friend ostream& operator<<(ostream& os, const ModInt& m) {
    os << m.val;
    return os;
  }
  friend istream& operator>>(istream& is, ModInt& m) {
    is >> m.val;
    return is;
  }
};
template <typename T>
T gcd(T a, T b) {
  if (a == 0) return b;
  return gcd(b % a, a);
}
template <typename T>
T lcm(T a, T b) {
  ModInt<mod> x = a;
  ModInt<mod> y = b;
  ModInt<mod> denom = gcd(a, b);
  ModInt<mod> ans = (x * y) / denom;
  long long int num = ans.val;
  return num;
}
void solve() {
  long long int n;
  cin >> n;
  long long int a[n];
  long long int pro = 1;
  long long int L = 1;
  long long int gall;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    pro *= a[i];
    pro %= mod;
    L = lcm(L, a[i]);
    L %= mod;
    if (i) {
      gall = gcd(gall, a[i]);
    } else {
      gall = a[i];
    }
  }
  if (pro == L) {
    cout << "pairwise coprime"
         << "\n";
    return;
  }
  if (gall == 1) {
    cout << "setwise coprime"
         << "\n";
    return;
  }
  cout << "not coprime"
       << "\n";
}
int32_t main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  solve();
  return 0;
}
