#include <bits/stdc++.h>
using namespace std;
map<long long, int> mp;
bool isok = true;
long long kgcd(long long a, long long b) {
  if (a == 0) return b;
  if (b == 0) return a;
  if (!(a & 1) && !(b & 1))
    return kgcd(a >> 1, b >> 1) << 1;
  else if (!(b & 1))
    return kgcd(a, b >> 1);
  else if (!(a & 1))
    return kgcd(a >> 1, b);
  else
    return kgcd(abs(a - b), min(a, b));
}
long long mod_mul(long long x, long long y, long long p) {
  long long s = 0;
  while (y > 0) {
    if (y & 1) {
      s += x;
      s %= p;
    }
    x <<= 1;
    x %= p;
    y >>= 1;
  }
  return s;
}
long long mod_exp(long long x, long long y, long long p) {
  long long s = 1;
  while (y > 0) {
    if (y & 1) s = mod_mul(s, x, p);
    x = mod_mul(x, x, p);
    y >>= 1;
  }
  return s;
}
bool miller_rabin(long long n) {
  if (n == 2 || n == 3 || n == 5 || n == 7 || n == 11) return true;
  if (n == 1 || !(n & 1) || !(n % 3) || !(n % 5) || !(n % 7) || !(n % 11))
    return false;
  long long u = n - 1, x, pre;
  int k = 0;
  while (!(u & 1)) {
    k++;
    u >>= 1;
  }
  for (int i = 0; i < 3; i++) {
    x = rand() % (n - 2) + 2;
    if (!(x % n)) continue;
    x = mod_exp(x, u, n);
    pre = x;
    for (int j = 0; j < k; j++) {
      x = mod_mul(x, x, n);
      if (x == 1 && pre != 1 && pre != n - 1) return false;
      pre = x;
    }
    if (x != 1) return false;
  }
  return true;
}
long long pollard_rho(long long n) {
  long long i = 1, k = 2;
  long long x = rand() % (n - 1) + 1;
  long long y = x;
  long long c = rand() % (n - 1) + 1;
  while (true) {
    i++;
    x = (mod_mul(x, x, n) + c) % n;
    long long d = kgcd(abs(y - x), n);
    if (d > 1 && d < n) return d;
    if (y == x) return n;
    if (i == k) {
      y = x;
      k <<= 1;
    }
  }
}
void getfactors(long long n, set<long long> &st) {
  long long p = n;
  if (n <= 1) return;
  if (miller_rabin(n)) {
    if (st.find(n) == st.end()) {
      int t = mp[n]++;
      if (t > 0) isok = false;
      st.insert(n);
    }
    return;
  }
  while (p >= n) p = pollard_rho(p);
  getfactors(p, st);
  getfactors(n / p, st);
}
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    int a;
    scanf("%d", &a);
    set<long long> st;
    getfactors(a, st);
  }
  if (isok)
    cout << "pairwise coprime" << endl;
  else {
    isok = true;
    for (pair<long long, int> p : mp)
      if (p.second >= n) {
        isok = false;
        break;
      }
    if (isok)
      cout << "setwise coprime" << endl;
    else
      cout << "not coprime" << endl;
  }
  return 0;
}
