#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1000000007;
const long long INF = 1e12;
using Graph = vector<vector<long long>>;
long long gcd(long long a, long long b) {
  if (!a) return b;
  return gcd(b % a, a);
}
signed main() {
  long long N;
  cin >> N;
  vector<long long> A(N);
  for (long long i = 0; i < N; i++) cin >> A[i];
  bool fg1 = 1;
  bool fg2 = 1;
  if (N < 80000) {
  } else {
    fg1 = 0;
  }
  long long T = gcd(A[0], A[1]);
  for (long long i = 2; i < N; i++) {
    if (gcd(T, A[i]) != 1) fg2 = 0;
  }
  if (fg1)
    cout << "pairwise coprime" << endl;
  else if (fg2)
    cout << "setwise coprime" << endl;
  else
    cout << "not coprime" << endl;
}
