#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using vi = vector<int>;
using vi2 = vector<vector<int>>;
using vl = vector<ll>;
using vl2 = vector<vector<ll>>;
using vb = vector<bool>;
using vb2 = vector<vector<bool>>;
using vc = vector<char>;
using vc2 = vector<vector<char>>;
using vs = vector<string>;
using si = set<int>;
using vs2 = vector<vector<string>>;
using pii = pair<int, int>;
using mii = map<int, int>;
const int INF = 1e9 + 1;
const ll LINF = 1e18 + 1;
const long double LPI = acos(-1.0);
const double PI = acos(-1.0);
const int mod = 1000000007;
template <typename T>
inline istream& operator>>(istream& i, vector<T>& v) {
  for (int j = 0; j < (int)((int)(v).size()); j++) i >> v[j];
  return i;
}
template <typename T>
bool chmax(T& a, const T& b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
}
template <typename T>
bool chmin(T& a, const T& b) {
  if (a > b) {
    a = b;
    return true;
  }
  return false;
}
template <typename T>
T gcd(T a, T b) {
  if (b == 0) {
    return a;
  } else {
    return gcd(b, a % b);
  }
}
template <typename T>
T lcm(T a, T b) {
  return a * b / gcd(a, b);
}
template <typename T>
bool isPrime(T a) {
  if (a <= 1) {
    return false;
  }
  for (T i = 2; i * i <= a; i++) {
    if (a % i == 0) {
      return false;
    }
  }
  return true;
}
template <typename T>
T ord(T p, T n) {
  T ans = 0;
  while (true) {
    if (n % p == 0) {
      n /= p;
      ans++;
    } else {
      break;
    }
  }
  return ans;
}
struct mint {
  ll x;
  mint(ll x = 0) : x((x % mod + mod) % mod) {}
  mint operator-() const { return mint(-x); }
  mint& operator+=(const mint a) {
    if ((x += a.x) >= mod) x -= mod;
    return *this;
  }
  mint& operator-=(const mint a) {
    if ((x += mod - a.x) >= mod) x -= mod;
    return *this;
  }
  mint& operator*=(const mint a) {
    (x *= a.x) %= mod;
    return *this;
  }
  mint operator+(const mint a) const { return mint(*this) += a; }
  mint operator-(const mint a) const { return mint(*this) -= a; }
  mint operator*(const mint a) const { return mint(*this) *= a; }
  mint pow(ll t) const {
    if (!t) return 1;
    mint a = pow(t >> 1);
    a *= a;
    if (t & 1) a *= *this;
    return a;
  }
  mint inv() const { return pow(mod - 2); }
  mint& operator/=(const mint a) { return *this *= a.inv(); }
  mint operator/(const mint a) const { return mint(*this) /= a; }
};
istream& operator>>(istream& is, mint& a) { return is >> a.x; }
ostream& operator<<(ostream& os, const mint& a) { return os << a.x; }
int main() {
  int n;
  cin >> n;
  ;
  vector<int> a(n);
  cin >> a;
  ;
  int g = a[0];
  for (int i = 0; i < (int)(n); i++) {
    g = gcd(g, a[i]);
  }
  if (g != 1) {
    cout << ("not coprime") << endl;
    ;
    return 0;
  }
  vector<int> p = {2,  3,  5,  7,  11, 13, 17, 19, 23, 29, 31, 37, 41,
                   43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97};
  bool flag = true;
  for (int i : p) {
    int c = 0;
    for (int j = 0; j < (int)(n); j++) {
      if (a[j] % i == 0) {
        c++;
      }
    }
    if (c > 1) {
      flag = false;
      break;
    }
  }
  if (flag) {
    cout << ("pairwise coprime") << endl;
    ;
  } else {
    cout << ("setwise coprime") << endl;
    ;
  }
}
