#include <bits/stdc++.h>
using namespace std;
template <class T>
bool umin(T &a, T b) {
  return a > b ? (a = b, true) : false;
}
template <class T>
bool umax(T &a, T b) {
  return a < b ? (a = b, true) : false;
}
const long long N = 5e3 + 10;
const long long mod = 1e9 + 7;
const long long maxN = 1e6 + 10;
bool isprm[maxN];
vector<long long> primes;
void seive() {
  for (long long i = 0; i < maxN; i++) isprm[i] = true;
  isprm[0] = isprm[1] = false;
  for (long long i = 2; i < maxN; i++)
    if (isprm[i])
      for (long long j = 2 * i; j < maxN; j += i) isprm[j] = false;
  for (long long i = 2; i < maxN; i++)
    if (isprm[i]) primes.push_back(i);
}
void solve(long long tc) {
  long long n;
  cin >> n;
  long long a[n];
  for (long long i = 0; i < n; i++) cin >> a[i];
  for (auto u : primes) {
    long long cnt = 0;
    for (long long i = 0; i < n; i++)
      if (a[i] % u == 0) {
        cnt++;
      }
    if (cnt == n) {
      cout << "not coprime\n";
      return;
    }
    if (cnt >= 2) {
      cout << "setwise coprime\n";
      return;
    }
  }
  cout << "pairwise coprime\n";
}
signed main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  seive();
  long long t = 1;
  for (long long i = 1; i <= t; i++) solve(i);
  return 0;
}
