#include <bits/stdc++.h>

using namespace std;

template<int MOD>
struct Modular {
  int value;
  Modular(const Modular& k) : value(k.value) {}

  template<typename V>
    Modular(const V& v) : value(v % MOD) {
      if (value < 0) {
        value += MOD;
      }
    }

  Modular() : Modular(0) {}

  Modular& operator+=(Modular const& b) { value += b.value; if (value >= MOD) value -= MOD; return *this; } 
  Modular& operator-=(Modular const& b) { value -= b.value; if (value < 0) value += MOD; return *this; }
  Modular& operator*=(Modular const& b) { value = (long long)value * b.value % MOD; return *this; }
  Modular& operator++() { return *this += 1; }
  Modular& operator--() { return *this -= 1; }
  Modular operator++(int) { return *this += 1; }
  Modular operator--(int) { return *this -= 1; }

  friend Modular inverse(Modular a) { return mexp(a, MOD - 2); }
  Modular& operator/=(Modular const& b) { return *this *= inverse(b); }
  friend Modular operator+(Modular a, Modular const b) { return a += b; }
  friend Modular operator-(Modular a, Modular const b) { return a -= b; }
  friend Modular operator-(Modular const a) { return 0 - a; }
  friend Modular operator*(Modular a, Modular const b) { return a *= b; }
  friend Modular operator/(Modular a, Modular const b) { return a /= b; }
  friend std::ostream& operator<<(std::ostream& os, Modular const& a) { return os << a.value; }
  friend bool operator==(Modular const& a, Modular const& b) { return a.value == b.value; }
  friend bool operator!=(Modular const& a, Modular const& b) { return a.value != b.value; }
};

template <int T, typename V>
Modular<T> mexp(Modular<T> a, V e) {
  if (a == 0) return e == 0 ? 1 : 0; 
  Modular<T> res = 1; 
  while (e) { 
    if (e & 1) 
      res *= a; 
    a *= a; 
    e >>= 1; 
  }
  return res;
}

constexpr int MOD = 1'000'000'007;

using Mint = Modular<MOD>;

const int N = 1010;

void Run() {
  int n;
  cin >> n;
  vector<int> a(n);
  vector<bool> prime(N * N, true);
  vector<int> have;
  for (int i = 2; i < N * N; ++i) {
    if (!prime[i]) {
      continue;
    }
    if (i < N) {
      have.push_back(i);
    }
    for (int j = 2 * i; j < N * N; j += i) {
      prime[j] = false;
    }
  }
  prime[1] = false;
  function<int(int, int)> Gcd = [&](int x, int y) {
    return y == 0 ? x : gcd(y, x % y);
  };
  int g = 0;
  for (int i = 0; i < n; ++i) {
    cin >> a[i];
    g = gcd(g, a[i]);
  }
  vector<int> cnt(N * N, 0);
  bool bad = false;
  for (int i = 0; i < n; ++i) {
    if (prime[a[i]]) {
      if (++cnt[a[i]] > 1) {
        bad = true;
        break;
      }
    }
    else {
      for (int x : have) {
        if (a[i] % x == 0) {
          if (++cnt[x] > 1) {
            bad = true;
            break;
          }
        }
      }
    }
  }
  if (!bad) {
    cout << "pairwise coprime\n";
  } else if (g == 1) {
    cout << "setwise coprime\n";
  } else {
    cout << "not coprime\n";
  }
}

int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  Run();
  return 0;
}