#include <bits/stdc++.h>
using namespace std;
int p[(1 << 20)];
int a[(1 << 20)];
int n;
multiset<int> s;
int gcd(int a, int b) {
  if (b == 0) {
    return a;
  }
  return gcd(b, a % b);
}
int main() {
  cout << fixed << setprecision(12);
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    s.insert(a[i]);
  }
  for (int i = 2; i < (1 << 20); i++) {
    p[i] = 1;
  }
  for (int i = 2; i < (1 << 20); i++) {
    if (p[i]) {
      for (int j = 2 * i; j < (1 << 20); j += i) {
        p[j] = 0;
      }
    }
  }
  bool pw = true;
  for (int i = 2; i < (1 << 20); i++) {
    int cnt = 0;
    if (p[i]) {
      for (int j = i; j < (1 << 20); j += i) {
        cnt += s.count(j);
      }
    }
    if (cnt > 1) {
      pw = false;
    }
  }
  int ret = a[0];
  for (int i = 1; i < n; i++) {
    ret = gcd(ret, a[i]);
  }
  bool sw = (ret == 1);
  if (sw && !pw) {
    cout << "setwise coprime" << endl;
  } else if (pw) {
    cout << "pairwise coprime" << endl;
  } else if (!sw && !pw) {
    cout << "not coprime" << endl;
  }
  return 0;
}
long long MOD = ((long long)1e9 + 7);
struct mod {
  long long x;
  mod(long long tx = 0) {
    x = tx;
    x %= MOD;
  }
  mod& operator=(const long long& tx) {
    x = tx % MOD;
    return *this;
  }
  mod& operator=(const mod& m2) {
    x = m2.x;
    return *this;
  }
  mod operator+(const mod& m2) const { return mod((x + m2.x) % MOD); }
  mod& operator+=(const mod& m2) {
    x += m2.x;
    x %= MOD;
    return *this;
  }
  mod operator-(const mod& m2) const { return mod((x - m2.x + MOD) % MOD); }
  mod& operator-=(const mod& m2) {
    x -= m2.x;
    x = (x + MOD) % MOD;
    return *this;
  }
  mod operator*(const mod& m2) const { return mod((x * m2.x) % MOD); }
  mod& operator*=(const mod& m2) {
    x *= m2.x;
    x %= MOD;
    return *this;
  }
  mod mypow(long long k) const {
    mod ret = 1;
    mod cur = x;
    while (k) {
      if (k & 1) {
        ret *= cur;
      }
      cur *= cur;
      k >>= 1;
    }
    return ret;
  }
  mod inv() const { return mypow(MOD - 2); }
  mod operator/(const mod& m2) const { return (*this) * m2.inv(); }
  mod& operator/=(const mod& m2) {
    x *= m2.inv().x;
    x %= MOD;
    return *this;
  }
  bool operator<(const mod& m2) const { return x < m2.x; }
};
ostream& operator<<(ostream& os, const mod& m) { return os << m.x; }
