#include <bits/stdc++.h>
using namespace std;
long long fast_exp(long long base, long long exp) {
  long long res = 1;
  while (exp > 0) {
    if (exp % 2 == 1) res = (res * base) % 1000000007;
    base = (base * base) % 1000000007;
    exp /= 2;
  }
  return res % 1000000007;
}
long long fib(long long n) {
  if (n < 2) return n;
  long long a = 0, b = 1, pre;
  int i = 1;
  while (i < n) {
    pre = (a + b) % 1000000007;
    a = b;
    b = pre;
    i++;
  }
  return pre;
}
long long fac(long long n) {
  if (n % 2 == 0) return 2;
  for (long long i = 3; i * i <= n; i += 2) {
    if (n % i == 0) return i;
  }
  return n;
}
long long fact(long long n) {
  if (n > 1)
    return n * fact(n - 1);
  else
    return 1;
}
bool sortbysec(const tuple<int, int, int> &a, const tuple<int, int, int> &b) {
  return (get<1>(a) < get<1>(b));
}
int last_digit(int n) {
  int ans = 0;
  while (n != 0) {
    ans = n % 10;
    n /= 10;
  }
  return ans;
}
long long moduloMultiplication(long long a, long long b, long long mod) {
  long long res = 0;
  a %= mod;
  while (b) {
    if (b & 1) res = (res + a) % mod;
    a = (2 * a) % mod;
    b >>= 1;
  }
  return res;
}
long long gcd(long long a, long long b) {
  if (a == 0) return b;
  return gcd(b % a, a);
}
int main() {
  long long n;
  cin >> n;
  vector<long long> a(n);
  for (long long i = 0; i < n; i++) cin >> a[i];
  ;
  long long lcm = a[0];
  long long g = a[0];
  for (int i = 1; i < n; i++) {
    lcm = (moduloMultiplication(a[i], lcm, 1000000007)) / gcd(lcm, a[i]);
    g = gcd(g, a[i]);
  }
  long long prod = 1;
  for (int i = 0; i < n; i++) {
    prod = moduloMultiplication(prod, a[i], 1000000007);
  }
  if (lcm == prod) {
    cout << "pairwise coprime";
    return 0;
  }
  if (g == 1) {
    cout << "setwise coprime";
    return 0;
  }
  cout << "not coprime";
}
