#include <bits/stdc++.h>
using namespace std;
const int N = 1e3 + 5;
const int INF = 1e9;
const long long MOD = 1e9 + 7;
vector<int> primes(1, 2);
vector<vector<long double>> nk;
void sieve() {
  vector<int> m(N + 1, 0);
  for (int i = 4; i < N; i += 2) m[i] = 1;
  for (int i = 3; i * i <= N; i += 2)
    if (!m[i])
      for (int j = i * i; j < N; j += i) m[j] = 1;
  for (int i = 3; i < N; i += 2)
    if (!m[i]) primes.push_back(i);
}
void pascal() {
  nk = vector<vector<long double>>(N, vector<long double>(N, 0.0));
  for (int i = (0), ThxMK = (N); i < ThxMK; ++i) nk[i][0] = nk[i][i] = 1.0;
  for (int i = (1), ThxMK = (N); i < ThxMK; ++i)
    for (int j = (1), ThxMK = (i); j < ThxMK; ++j)
      nk[i][j] = nk[i - 1][j - 1] + nk[i - 1][j];
}
long long gcd(long long a, long long b) { return (b ? gcd(b, a % b) : a); }
long long lcm(long long a, long long b) {
  if (a < b) swap(a, b);
  long long c = gcd(a, b);
  a /= c;
  return a * b;
}
int popcount(long long x) { return __builtin_popcountll(x); }
long long poww(long long a, long long b) {
  long long res = 1;
  while (b) {
    if (b & 1) res = res * a;
    a = a * a;
    b /= 2;
  }
  return res;
}
long long powm(long long a, long long b) {
  long long res = 1;
  while (b) {
    if (b & 1) res = (res * a) % MOD;
    a = (a * a) % MOD;
    b /= 2;
  }
  return res;
}
bool isPrime(long long x) {
  if (x == 1) return 0;
  for (auto i : primes) {
    if (i * i > x) return 1;
    if (x % i == 0) return 0;
  }
  return 1;
}
long long SUM(long long a, long long b, long long mod = MOD) {
  return (a + b + mod) % mod;
}
long long PROD(long long a, long long b, long long mod = MOD) {
  a %= mod;
  b %= mod;
  return a * b % mod;
}
int dx[4] = {-1, 0, 0, 1}, dy[4] = {0, 1, -1, 0};
void solve() {
  int n;
  cin >> n;
  sieve();
  map<int, int> x;
  for (int i = (0), ThxMK = (n); i < ThxMK; ++i) {
    int a;
    cin >> a;
    for (auto j : primes) {
      if (j * j > a) break;
      if (a % j == 0) {
        x[j]++;
        while (a % j == 0) a /= j;
      }
    }
  }
  int mx = 1;
  for (auto &[a, b] : x) mx = max(b, mx);
  if (mx == 1) {
    cout << "pairwise coprime" << '\n';
    return;
  }
  if (mx != n) {
    cout << "setwise coprime" << '\n';
    return;
  }
  cout << "not coprime" << '\n';
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  solve();
}
