#include <bits/stdc++.h>
using namespace std;
#pragma GCC optimize("O2")
const double PI = acos(-1);
long long power(long long a, long long b, long long m = 1e9 + 7) {
  long long ans = 1;
  a = a % m;
  while (b > 0) {
    if (b & 1) ans = (1ll * a * ans) % m;
    b >>= 1;
    a = (1ll * a * a) % m;
  }
  return ans;
}
long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }
long long lcm(long long x, long long y) { return (x * y) / gcd(x, y); }
bool isprime(long long n) {
  if (n < 2) return 0;
  long long i = 2;
  while (i * i <= n) {
    if (n % i == 0) return 0;
    i++;
  }
  return 1;
}
bool isPowerOfTwo(long long x) { return x && (!(x & (x - 1))); }
const long long MAXN = 1e6 + 10;
const long long inf = 1e18;
long long intlog(double base, double x) {
  return (long long)(log(x) / log(base));
}
bool spf[MAXN];
bool check(long long x) {
  if (spf[x]) return false;
  if (x % 2 == 0) {
    if (spf[2]) return false;
    spf[2] = true;
    while (x % 2 == 0) x /= 2;
  }
  for (long long i = 3; i * i <= x; i += 2) {
    if (x % i == 0) {
      if (spf[i]) return false;
      spf[i] = true;
      while (x % i == 0) x /= i;
    }
  }
  if (x > 1) {
    if (spf[x]) return false;
    spf[x] = true;
  }
  return false;
}
int32_t main() {
  ios::sync_with_stdio(0);
  cin.tie(NULL);
  cout.tie(NULL);
  long long n;
  cin >> n;
  vector<long long> a(n);
  for (long long i = 0; i < n; ++i) {
    cin >> a[i];
  }
  long long gc = a[0];
  for (long long j = 0; j < n; ++j) {
    gc = gcd(gc, a[j]);
  }
  if (gc > 1) {
    cout << "not coprime"
         << "\n";
  } else if (gc == 1) {
    for (long long i = 0; i < n; ++i) {
      if (!check(a[i])) {
        cout << "setwise coprime";
        return 0;
      }
    }
    cout << "pairwise coprime";
  }
}
