#include <bits/stdc++.h>
#pragma GCC optimize("O3")
using namespace std;
const long long INF = 1e18;
const long double PI = acos((long double)-1);
const int d4i[4] = {-1, 0, 1, 0}, d4j[4] = {0, 1, 0, -1};
const int d8i[8] = {-1, -1, 0, 1, 1, 1, 0, -1},
          d8j[8] = {0, 1, 1, 1, 0, -1, -1, -1};
string to_string(char c) { return string(1, c); }
string to_string(const char* s) { return (string)s; }
string to_string(string s) { return s; }
string to_string(bool b) { return b ? "true" : "false"; }
string to_string(vector<bool> v) {
  string res;
  for (int i = (0); i < ((int)(v).size()); ++i) res += char('0' + v[i]);
  return res;
}
template <size_t SZ>
string to_string(bitset<SZ> b) {
  string res;
  for (int i = (0); i < (SZ); ++i) res += char('0' + b[i]);
  return res;
}
template <class T>
T gcd(T a, T b) {
  return b ? gcd(b, a % b) : a;
}
template <class T>
bool ckmin(T& a, const T& b) {
  return b < a ? a = b, 1 : 0;
}
template <class T>
bool ckmax(T& a, const T& b) {
  return a < b ? a = b, 1 : 0;
}
constexpr int pct(int x) { return __builtin_popcount(x); }
constexpr int bits(int x) { return 31 - __builtin_clz(x); }
const long long MOD = 1e9 + 7;
const int MX = 1e6 + 5;
int tree[1];
int sum(int k) {
  int a = 0;
  while (k >= 1) {
    a += tree[k];
    k -= k & -k;
  }
  return a;
}
void add(int k, int x) {
  while (k <= MX) {
    tree[k] += x;
    k += k & -k;
  }
}
int table[MX] = {0};
void solve() {
  vector<int> prime1001;
  for (int i = 2; i < 1001; ++i)
    if (table[i] == 0) {
      prime1001.push_back(i);
      for (int j = i; j < MX; j += i) table[j] = 1;
    }
  int n;
  cin >> n;
  vector<int> A(n);
  for (int i = (0); i < (n); ++i) cin >> A[i];
  int gcdall = A[0];
  bool flag = 0;
  set<int> st;
  for (int i = (0); i < (n); ++i) {
    gcdall = gcd(gcdall, A[i]);
    for (auto p : prime1001)
      if (A[i] % p == 0) {
        if (st.find(p) != st.end())
          flag = 1;
        else {
          st.insert(p);
          while (A[i] % p == 0) A[i] /= p;
        }
        st.insert(p);
      }
  }
  if (gcdall != 1) {
    cout << "not coprime\n";
  } else if (flag) {
    cout << "setwise coprime\n";
  } else {
    cout << "pairwise coprime\n";
  }
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int t = 1;
  while (t--) {
    solve();
  }
  return 0;
}
