#include <bits/stdc++.h>
#pragma GCC optimize("O2")
#pragma GCC optimize("Ofast")
#pragma GCC target("sse4")
using namespace std;
template <class T>
bool umin(T& a, const T& b) {
  return b < a ? a = b, 1 : 0;
}
template <class T>
bool umax(T& a, const T& b) {
  return a < b ? a = b, 1 : 0;
}
const int MOD = 998244353;
const long long inf = 1e18;
const long long mod = 1e9 + 7;
template <typename T>
T gcd(T a, T b) {
  if (a == 0) return b;
  return gcd(b % a, a);
}
template <typename T>
T lcm(T a, T b) {
  return (a * b) / gcd(a, b);
}
template <typename T>
T power(T a, T b, long long m) {
  T ans = 1;
  while (b > 0) {
    if (b % 2 == 1) ans = (ans * a) % m;
    b /= 2;
    a = (a * a) % m;
  }
  return ans % m;
}
long long nCr(long long n, long long r) {
  long long t = 1;
  if (r > n) return 0;
  if (r > n - r) r = n - r;
  for (long long i = 0; i < r; i++) {
    t *= (n - i);
    t /= (i + 1);
  }
  return t;
}
void read(vector<int>& a) {
  for (long long i = 0; i < a.size(); ++i) cin >> a[i];
}
void read(vector<long double>& a) {
  for (long long i = 0; i < a.size(); ++i) cin >> a[i];
}
bool prime(long long t) {
  for (long long i = 2; i * i <= t; ++i) {
    if (t % i == 0) return 0;
  }
  return 1;
}
bool cmp(pair<int, int>& a, pair<int, int>& b) {
  if (a.second == b.second) return a.first > b.first;
  return a.second < b.second;
}
const int N = 1e6 + 1;
int store[N];
vector<bool> vis(N);
vector<int> primes;
void sieve() {
  store[1] = 1;
  for (int i = 2; i < N; ++i) {
    if (!vis[i]) {
      primes.push_back(i);
      vis[i] = 1;
      store[i] = i;
      for (int j = 2 * i; j < N; j += i) {
        vis[j] = 1;
        store[j] = i;
      }
    }
  }
}
int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  for (long long i = 0; i < n; ++i) cin >> a[i];
  int g = 0;
  for (long long i = 0; i < n; ++i) {
    g = gcd(g, a[i]);
  }
  if (g > 1) {
    cout << "not coprime";
    return 0;
  }
  sieve();
  set<int> fac;
  bool ok = 1;
  for (long long i = 0; i < n; ++i) {
    int x = a[i];
    set<int> z;
    while (x != 1) {
      int tmp = store[x];
      x /= tmp;
      z.insert(tmp);
    }
    for (int y : z) {
      if (find((fac).begin(), (fac).end(), y) == fac.end())
        fac.insert(y);
      else {
        ok = 0;
        break;
      }
    }
    if (!ok) break;
  }
  if (ok) {
    cout << "pairwise coprime";
  } else {
    cout << "setwise coprime";
  }
  return 0;
}
