#include <bits/stdc++.h>
#pragma gcc optimize(2)
using namespace std;
long long n, a[2333333], pr[2333333], tot = 1, cnt;
vector<long long> p;
inline long long gcd(long long x, long long y) {
  if (x < y) swap(x, y);
  return !y ? x : gcd(y, x % y);
}
inline long long lcm(long long x, long long y) { return x / gcd(x, y) * y; }
signed main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n;
  for (long long i = 2; i <= n; i++) pr[i] = 1;
  for (long long i = 2; i <= n; i++)
    if (pr[i]) {
      p.push_back(i);
      for (long long j = i * i; j <= n; j += i) pr[i] = 0;
    }
  for (long long i = 1; i <= n; i++) {
    long long x, t = 1;
    cin >> x;
    a[i] = x;
    for (long long j = 0; j < p.size() && p[j] <= x; j++)
      if (x % p[j] == 0) {
        t *= p[j];
        while (x % p[j] == 0) x /= p[j];
      }
    cnt += gcd(t *= x, tot) != 1;
    tot = lcm(t, tot);
  }
  long long g = a[1];
  for (long long i = 2; i <= n && g > 1; i++) g = gcd(g, a[i]);
  if (!cnt)
    cout << "pairwise coprime\n";
  else if (cnt == n - 1) {
    if (g > 1)
      cout << "not coprime\n";
    else
      cout << "setwise coprime\n";
  }
}
