#include <bits/stdc++.h>
using namespace std;
void Cond(int g) {
  if (g)
    cout << ("YES") << endl;
  else
    cout << ("NO") << endl;
  return;
}
void cond(int g) {
  if (g)
    cout << ("Yes") << endl;
  else
    cout << ("No") << endl;
  return;
}
long long gcd(long long a, long long b) {
  if (a < b) swap(a, b);
  if (a % b == 0) return b;
  gcd(b, a % b);
}
string su = "0123456789";
string m1 = "abcdefghijklmnopqrstuvwxyz";
string m2 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
map<char, long long> m5;
const long long INF = (long long)1e18 + 10;
long long t1 = 0, t2 = 0, t3 = 0, t4 = 0, t5 = 0, t6 = 0, t7 = 0, t8 = 0, g = 0,
          ans = 0;
long long n = 0, m = 0, mx = -INF, mn = INF, ct = 0, cnt = 0;
long long sum = 0, mask = 0;
long long k;
set<pair<long long, long long>> pst;
set<long long> st;
long long powmod(long long a, long long b, long long x) {
  if (!b) return 1;
  if (!(b % 2)) {
    long long t = powmod(a, b / 2, x);
    return t * t % x;
  }
  return ((a)*powmod(a, b - 1, x)) % x;
}
void di() {
  m5['a'] = 0;
  m5['b'] = 1;
  m5['c'] = 2;
  m5['d'] = 3;
  m5['e'] = 4;
  m5['f'] = 5;
  m5['g'] = 6;
  m5['h'] = 7;
  m5['i'] = 8;
  m5['j'] = 9;
  m5['k'] = 10;
  m5['l'] = 11;
  m5['m'] = 12;
  m5['n'] = 13;
  m5['o'] = 14;
  m5['p'] = 15;
  m5['q'] = 16;
  m5['r'] = 17;
  m5['s'] = 18;
  m5['t'] = 19;
  m5['u'] = 20;
  m5['v'] = 21;
  m5['w'] = 22;
  m5['x'] = 23;
  m5['y'] = 24;
  m5['z'] = 25;
}
map<long long, long long> mp;
typedef struct edge2 {
  pair<long long, long long> tos;
  long long cost;
} EDGE2;
typedef struct edge1 {
  long long to, cost;
} EDGE;
bool used[(long long)1e6];
const long long M = (long long)1e9 + 7;
long long fac[1000007], finv[1000007], inv[1000007];
void initcmb() {
  fac[0] = fac[1] = 1;
  finv[0] = finv[1] = 1;
  inv[1] = 1;
  for (int i = 2; i < 1000007; i++) {
    fac[i] = fac[i - 1] * i % M;
    inv[i] = M - inv[M % i] * (M / i) % M;
    finv[i] = finv[i - 1] * inv[i] % M;
  }
}
long long cmb(long long n, long long k) {
  if (n < k) return 0;
  if (n < 0 || k < 0) return 0;
  return fac[n] * (finv[k] * finv[n - k] % M) % M;
}
double pi =
    3.14159265358979323846264338327950288419716939937510582097494459230781640628620899862803482534211706798214808651328230664709384460955058223172535940812848111745028410270193852110555964462294895493038196;
template <class T>
inline bool chmax(T& a, T b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T>
inline bool chmin(T& a, T b) {
  if (a > b) {
    a = b;
    return 1;
  }
  return 0;
}
const long long MAX = (long long)1e5 * 3;
std::vector<long long> rui(MAX);
std::vector<long long> ru1(MAX);
std::vector<long long> ru2(MAX);
vector<vector<EDGE>> G(1e6);
vector<vector<long long>> a(1e5 * 3);
std::vector<long long> color(1e5 * 3, -1);
void dfs(long long vtx) {
  color[vtx] = k;
  used[vtx] = true;
  for (long long i = 0; i < a[vtx].size(); i++) {
    if (used[a[vtx][i]] == false) {
      dfs(a[vtx][i]);
    }
  }
  return;
}
int main() {
  clock_t start = clock();
  cin >> n;
  std::vector<long long> a(n + 3);
  for (long long i = 1; i < n + 1; i++) {
    cin >> a[i];
  }
  t1 = a[1];
  for (long long i = 2; i < n + 1; i++) {
    t1 = gcd(t1, a[i]);
  }
  bool setWiseCoprime = (t1 == 1);
  vector<long long> v;
  bool b[(long long)1e6 + 3];
  for (long long i = 2; i < (long long)1e6 + 1; i++) {
    if (b[i] == false) {
      v.push_back(i);
      for (long long j = i; j <= (long long)1e6; j += i) {
        b[j] = true;
      }
    }
  }
  for (long long i = 1; i < n + 1; i++) {
    for (long long j = 0; j < v.size(); j++) {
      if (v[j] > a[i]) break;
      if (a[i] % v[j] == 0) {
        st.insert(v[j]);
        mp[v[j]]++;
      }
    }
  }
  t1 = 0;
  for (long long i = 0; i < v.size(); i++) {
    if (mp[v[i]] >= 2) {
      t1 = 1;
      break;
    }
  }
  if (t1 == 0) {
    cout << ("pairwise coprime") << endl;
    return 0;
  } else if (setWiseCoprime) {
    cout << ("setwise coprime") << endl;
  } else
    cout << ("not coprime") << endl;
  clock_t end = clock();
  const double time =
      static_cast<double>(end - start) / CLOCKS_PER_SEC * 1000.0;
  return 0;
}
